[R] axis tick colors: only one value allowed?
Hans W Borchers
hwborchers at googlemail.com
Tue Dec 13 15:21:31 CET 2011
Carl Witthoft <carl <at> witthoft.com> writes:
>
> Hi,
> So far as I can tell, the 'col.ticks' parameter for axis() only uses the
> first value provided. E.g.:
>
> plot(0:1,0:1, col.ticks=c('blue','red','green')) #all ticks are blue
>
> Just wondering if there's a different option in the basic plot commands
> that can handle multiple colors, and also whether ggplot and/or lattice
> allow for multiple tick colors.
See `?axis' or try this:
plot(0:1,0:1, type = "n", axes = FALSE)
box()
axis(side=1, lwd.ticks = 2, col.ticks="blue")
axis(side=2, lwd.ticks = 2, col.ticks="red")
>
> [...]
>
> Carl
>
More information about the R-help
mailing list