[R] How to show the intermediate tick marks without the values in a different color
MSchwartz at mn.rr.com
Fri Mar 3 04:02:24 CET 2006
On Thu, 2006-03-02 at 20:06 -0600, xpRt.wannabe wrote:
> Is there a way to show also the intermediate tick marks without the
> What would one do to show the tick marks in, say, gray color at the
> increment of 1 without showing the actual values in-between the default
> values: 5, 10, 15, 20, 25?
# Do the plot without the x axis
plot(cars, xlim = c(0, 25), xaxt = "n")
# Do the x axis in grey with tick marks at 0:25
# without labels
axis(1, at = 0:25, labels = NA, col = "grey")
# Now do the default tick marks in black with labels
See ?plot.default, ?par (for 'xaxt') and ?axis for more information.
More information about the R-help