rpy2 and plotting

I had a problem to plot in R or rpy2 when I started the R on Terminal on Mac OSX (R works fine if started by clicking it on Lauchpad ). R throws an following error if locale is set to C.

Error in axis(side = side, at = at, labels = labels, ...) : 
  could not find any X11 fonts
Check that the Font Path is correct.
In addition: Warning messages:
1: In function (display = "", width, height, pointsize, gamma, bg,  :
  locale not supported by Xlib: some X ops will operate in C locale
2: In function (display = "", width, height, pointsize, gamma, bg,  :
  X cannot set locale modifiers

Running command “export LC_ALL=en_US.UTF-8” on Terminal before starting R or python fix this (or adding it to .profile file).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s