Skip to content

Wishlist: axis( ) could take vector of colors (PR#7930)

1 message · Uwe Ligges

#
epurdom at stanford.edu wrote:

            
A color of length > 1 does not make sense here, from my point of view. 
Hence I'd like to object here.
It might make sense for argument "col.axis", but this is very hard to 
implement due to the internal structure of automatical tick mark 
calculations.

Most easily you can use mtext() to annotate an un-annotated axis with 
different colors as in:

  plot(1:10, xaxt="n")
  axis(1, at=c(2,5,8), labels=rep("", 3))
  mtext(c(2,5,8), side=1, at=c(2,5,8),
        col=c("red", "green", "blue"), line=0.5)


Uwe Ligges