« The PMML Revolution: Predictive analytics at the speed of business | Main | A video map of the hottest songs in the US »

September 20, 2012

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a010534b1db25970b017744899f7b970d

Listed below are links to weblogs that reference How to use your favorite fonts in R charts:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Thanks for this absolutely great post! I've been craving for such a functionality :) Keep up the great work!

Hi Winston, this looks super interesting, and thanks for posting. However, when I try to install extrafont in Rstudio, I get the following error: package ‘extrafont’ is not available (for R version 2.14.1) Do you know how to proceed? Best, Sebastian

Hi Sebastian - I uploaded it to CRAN pretty recently, and they build it only for the latest version of R, which is now 2.15.1. The best thing to do is upgrade your copy of R. Normally, an alternative solution would be to install extrafont from a source package, but I believe it uses some features (of the system2() function) that were introduced in R 2.15, and it probably won't work correctly on R 2.14.

Winston - I'm a relative newbie to R but when I try to run your ggplot2 code in the first example I get errors saying that the functions "ggtitle" and "theme" could not be found. Which package are they contained in ??? I came up pretty much blank on google ... thanks in advance.

Craig - this requires the latest version of ggplot2, 0.9.2.1. You can get it by running update.packages().

I just noticed that for the experimental OTF and TTC support, I forgot to specify the branch. To install it, these are the commands to run: library(devtools) install_github("Rttf2pt1", "wch", "freetype2") install_github("extrafont", "wch", "freetype")

Craig, those are in the ggplot2 package.

I tried to install and use the Georgia font in Ubuntu and R 2.15.1 but got a message: Warning in load fonts() : More than one version of regular/bold/italic font for Georgia. Skipping setup for this font. Finally the font has not been installed. Is there any workaround for the problem?

Winston, this is quite nice. Do you know how I could use extrafonts as an alternative to the Cairo setup I just described in http://wp.me/p1X1Iq-8O ?

Interesting diagrams i have never tried to work out the R charts as seen above, but this article has teached me something about car fuel. thanks

Thanks a lot for this! It was really helpful!

Hi winston, thanks for that article.

Have you had any luck with dfonts?

Hi Winston,

So I've installed an external font as described, however, wordcloud seems to complain about not finding it.

Please see my post here: http://stackoverflow.com/questions/18108512/r-wordcloud-external-ttf-vfont-not-recognized

TIA!

Hi Winston,
Thanks for developing this! However, I'm having a problem with getting the correct font in the legend of my plot using legend(). Any ideas?

The comments to this entry are closed.


R for the Enterprise

Got comments or suggestions for the blog editor?
Email David Smith.
Follow revodavid on Twitter Follow David on Twitter: @revodavid

Search Revolutions Blog