[R] y-axis label location relative to tick label width?

Duncan Murdoch murdoch at stats.uwo.ca
Wed Jun 28 19:55:55 CEST 2006


On 6/28/2006 1:49 PM, ivo welch wrote:
> Dear R-Wizards:  does anyone know how to obtain the width of the
> widest y- or x-tick label that R has drawn, so that I can leave
> appropriate space between it and my overall axis text label
> appropriately?

Probably the easiest way is to draw them yourself.  That is, draw the 
plot with axes=FALSE, then draw the axes using the axis() function, 
using pretty() to calculate the tick locations.

Duncan Murdoch



More information about the R-help mailing list