xpRt.wannabe
2006-Mar-03 02:06 UTC
[R] How to show the intermediate tick marks without the values in a different color
Is there a way to show also the intermediate tick marks without the values? Example: plot(cars) 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 x values: 5, 10, 15, 20, 25? platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 2.1 year 2005 month 12 day 20 svn rev 36812 language R Thanks,
Marc Schwartz
2006-Mar-03 03:02 UTC
[R] How to show the intermediate tick marks without the values in a different color
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 > values? > > Example: > > plot(cars) > > 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 > x > values: 5, 10, 15, 20, 25?Try this: # 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 axis(1) See ?plot.default, ?par (for 'xaxt') and ?axis for more information. HTH, Marc Schwartz