[R] Plot grouped data: How to change x-axis? (nlme)

Douglas Bates bates at stat.wisc.edu
Wed Dec 31 16:05:51 CET 2003


Karl Knoblick <karlknoblich at yahoo.de> writes:

> Hallo!
> 
> GENERAL QUESTION:
> I'm trying to change the tick marks of the x-axis in a
> grouped data plot (nlme). 
> 
> CONCRETE EXAMPLE:
> In the example (see below) I want the x-axis to have
> tick marks at 0, 6, 12, 18, 24. How can I do this? 
> 
> WHAT I TRIED
> I tried "normal" methods like axis(...) but this does
> not work with this plot. And I also tried xlim=c(0,24)
> but the ticks are unchanged and the plot looks worse
> (because of no distances to the border of the Panels).

The grouped data plots use the lattice package.  To specify an axis in
lattice calls you must use the scales argument.  Details are given in
the documentation for xyplot.




More information about the R-help mailing list