[R-SIG-Mac] Plotting problems - where's the text?

Duncan Murdoch murdoch.duncan at gmail.com
Fri Jun 25 19:26:27 CEST 2010


On 25/06/2010 12:26 PM, Nicholas R Frazier wrote:
> Hi:
>
> I've been using R on my MacBook (OS X 10.6.3, 2 GHz Intel Core Duo) for a
> couple of months now.  I've noticed that whenever I plot a graph, the output
> never shows indices for the axes.  It shows tick marks on the side of the
> graph, but no text.  e.g.
>
> > test = merge(seq(1:10), seq(1:20))
> > plot(test)
>
> shows the correct plot, with 4 tick marks up the side of the Y axis, 5 tick
> marks down the X axis, but NO text or numbers anywhere.
>
> As another example, a pairs() plot doesn't show any text along the diagonal
> boxes, as it should.
>   

That's normally a symptom of setting the margins too small to hold the 
text, or (equivalently) the text too big to fit in the margins.  Take a 
look at par(), in particular see if you've changed the default values


$cex.axis
[1] 1

$mar
[1] 5.1 4.1 4.1 2.1

If you haven't changed those, then it looks like a font problem:  R 
thinks your default font is too big to fit.  The default font is 
determined by the par() setting

$font.axis
[1] 1

as well as defaults specific to your graphics device.  I don't have my 
Mac here, so I can't tell you what the default font is supposed to be on 
your Mac.

Duncan Murdoch



More information about the R-SIG-Mac mailing list