[R] Coloring axis labels on Lattice xyplot.

David Winsemius dwinsemius at comcast.net
Thu Jul 1 04:30:10 CEST 2010


On Jun 30, 2010, at 7:38 PM, Andrew Liu wrote:

> Hello,
>
> I am trying to color particular labels on my lattice xyplot.
>
> For example:
>
> library(lattice)
> z = data.frame(x = 1:5)
> xyplot(x~x, z)
>
> Is there any way for me to make the "4" on the y-axis blue?

  xyplot(x~x, z, scales=list(x=list(col=c("black",  
"black","black","red","blue"))))

>
> Thanks,
> Andy
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list