[R] Y-Axis Label Overwritten By TickMark Values

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Oct 1 23:56:42 CEST 2005


On Sat, 1 Oct 2005, Paul Roebuck wrote:

> On Sat, 1 Oct 2005, Marc Schwartz wrote:
>
>> On Sat, 2005-10-01 at 06:07 -0500, Paul Roebuck wrote:
>>
>>> Can someone tell me how to fix the left margin of plot region
>>> such that the tick values don't overwrite the x-axis label?
>>> I haven't been able to set the correct par option to fix this...
>>
>> This is the Y axis label, not the X axis.
>
> Oops. I'd been up all night...
>
>> Set par("mar") prior to creating the plot to increase the left
>> hand margin space and then use mtext() rather than title() to
>> move the Y axis label further left by using the 'line' argument.
>>
>> [SNIP code]
>>
>> See ?par and ?mtext for more information.
>
> What a black art. Pray tell where you learned this that I
> may study there as well.

The basic manual `An Introduction to R' is where we expect all new users 
to R to learn of the existence of such things: for historical reasons it 
takes the S/R graphics model further than most other topics.

There is an expanded version of that material and several examples in 
MASS4 (just consult the index), and a similar level/depth of coverage in 
Paul Murrell's book on R Graphics.

(Full details of all these sources are found in the FAQ.)

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list