[R] mark axis
MSchwartz at medanalytics.com
Fri Nov 28 16:27:18 CET 2003
On Fri, 2003-11-28 at 07:45, Nolwenn Le Meur wrote:
> Maybe a stupid question:
> In a plot, which parameter(s) ables to visualize the axis like in a
> where the axis is also visible in the plot background ?
There are two approaches:
1. Use par("tck") in the axis() command to extend the tick marks through
the plot region. The values for 'tck' are 0 to 1, representing the
proportion of the plot region that the tick marks will extend in to. For
axis(1, tck = 1)
axis(2, tck = 1)
2. Use grid(), which will do the same thing with a single function. This
is actually the way that coplot() does it. It has a default color of
'lightgray' to de-emphasize the grid. It uses a 'dotted' line by
default, so if you want a solid line like coplot(), change the 'lty'
See ?axis, ?par (for 'tck') and ?grid for more information.
More information about the R-help