[R] X11 font
Ben Bolker
bbo|ker @end|ng |rom gm@||@com
Wed Aug 16 23:13:51 CEST 2023
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
>
More information about the R-help
mailing list