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


______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to