skip to Main Content

Trying to plot a histogram in R 4.2.0, the fonts are not shown properly enter image description here

Searching online couldn’t find anything useful. Any hint, what is missing?

> sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS

Matrix products: default
BLAS/LAPACK: /miniconda3/envs/plotter/lib/libopenblasp-r0.3.20.so

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8
 [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8
 [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C
[10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_4.2.0

2

Answers


  1. Chosen as BEST ANSWER

    Installing R-essentials using conda solved the problem. Just keeping this post with answer in case someone else might have the same problem.

    conda install -c conda-forge r-essentials
    

  2. If you’re trying to load a non-standard font, you might check out the font_add_google() function in the sysfonts package

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search