I get the following error out of R, on a newer Ubuntu installation. Error in `axis()`: ! X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 12 could not be loaded Backtrace: ?1. graphics::matplot(...) ?3. graphics::plot.default(...) ?4. graphics (local) localAxis(...) ?6. graphics:::Axis.default(...) ?7. graphics::axis(side = side, at = at, labels = labels, ...) The context is pretty simple: library(survival) matplot(60:100, 36525* survexp.us[61:101, 1:2, "2014"], col=2:1, lty=1, lwd=2, ?? ?xlab="Age", ylab="Death rate per 100", log='y', type='l', yaxt='n', ??? main="US Death Rates") axis(2, c(1,2,5,10,20, 50), c(1,2,5,10, 20, 50), las=2) This code works fine on my screen.?? The error comes up when I put it into an .Rmd file and apply rmarkdown::render() to it. Likely some font file is needed, but what one? Terry Version: R Under development (unstable) (2023-08-01 r84818) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: aarch64-unknown-linux-gnu -- Terry M Therneau, PhD Department of Quantitative Health Sciences Mayo Clinic therneau at mayo.edu "TERR-ree THUR-noh" [[alternative HTML version deleted]]
There's an ancient related question ... maybe it helps? https://stat.ethz.ch/pipermail/r-help//2016-October/442326.html sudo apt-get install xfonts-100dpi sudo-apt-get install xfonts-75dpi apt-cache search xfonts doesn't pull up anything else obvious (presumably you already have xfonts-base ... ???) On 2023-08-16 5:08 p.m., Therneau, Terry M., Ph.D. via R-help wrote:> I get the following error out of R, on a newer Ubuntu installation. > > Error in `axis()`: > ! X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 12 could not be loaded > Backtrace: > ?1. graphics::matplot(...) > ?3. graphics::plot.default(...) > ?4. graphics (local) localAxis(...) > ?6. graphics:::Axis.default(...) > ?7. graphics::axis(side = side, at = at, labels = labels, ...) > > The context is pretty simple: > > library(survival) > matplot(60:100, 36525* survexp.us[61:101, 1:2, "2014"], col=2:1, lty=1, lwd=2, > ?? ?xlab="Age", ylab="Death rate per 100", log='y', type='l', yaxt='n', > ??? main="US Death Rates") > axis(2, c(1,2,5,10,20, 50), c(1,2,5,10, 20, 50), las=2) > > This code works fine on my screen.?? The error comes up when I put it into an .Rmd file > and apply rmarkdown::render() to it. > > Likely some font file is needed, but what one? > > Terry > > Version: > R Under development (unstable) (2023-08-01 r84818) -- "Unsuffered Consequences" > Copyright (C) 2023 The R Foundation for Statistical Computing > Platform: aarch64-unknown-linux-gnu >
? Wed, 16 Aug 2023 16:08:57 -0500 "Therneau, Terry M., Ph.D. via R-help" <r-help at r-project.org> ?????:> I get the following error out of R, on a newer Ubuntu installation.> ! X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at > size 12 could not be loaded> Version: > R Under development (unstable) (2023-08-01 r84818) -- "Unsuffered > Consequences" > Copyright (C) 2023 The R Foundation for Statistical Computing > Platform: aarch64-unknown-linux-gnuWhat's the output of capabilities()? It looks like you're getting png(type = 'Xlib') instead of the nicer looking png(type = 'cairo'). When you compiled R, did you have cairo headers installed? Try running sudo apt build-dep r-base, then running .../configure again, then compiling R. -- Best regards, Ivan