Will
Will

Reputation: 121

Poor font choices in plots after compiling R from source

I recently compiled R from source on Linux Mint 17 and everything is working correctly except my plots take a long time to load and the default font is quite bland (see image).

My sessionInfo is below:

sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.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_3.1.1 tools_3.1.1   

I checked the R installation and administration manual, but I'm not sure which (if any) ./configure options I missed.

Is there any way to fix this issue, or will I have to recompile R?

Thanks in advance.

Edit: More information:

    > X11.options()
$display
[1] ""

$width
[1] NA

$height
[1] NA

$pointsize
[1] 12

$bg
[1] "transparent"

$canvas
[1] "white"

$gamma
[1] 1

$colortype
[1] "true"

$maxcubesize
[1] 256

$fonts
[1] "-adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*"
[2] "-adobe-symbol-medium-r-*-*-%d-*-*-*-*-*-*-*"

$family
[1] "sans"

$xpos
[1] NA

$ypos
[1] NA

$title
[1] ""

$type
[1] "Xlib"

$antialias
[1] "default"

It clearly looks like other fonts are available, but specifying par(family="") still gives me the previously pictured plot style.

Upvotes: 1

Views: 131

Answers (1)

Will
Will

Reputation: 121

I looked around a bit more, and it appears that I did not allow for cairo support when I compiled R. Following these instructions, I recompiled R with the option --with-cairo and now I am able to adjust the font size and family when plotting.

Upvotes: 1

Related Questions