RE: [R] problem with chron scales in lattice

From: Waichler, Scott R <Scott.Waichler_at_pnl.gov>
Date: Thu 02 Jun 2005 - 05:29:18 EST


> > I can't get the scales parameter in xyplot of lattice to work as I
> > expected. I'm using R-2.1.0 and lattice 0.11-8. There should be
year
> > labels from 1992 to 2004 for the x axis in the plot below, but
instead
> > only a few of them appear, and in the wrong spots, as if the
> > coordinate system has changed after finishing with the panel
function.

> I'll try to figure out what the problem is. A temporary
> workaround is to
> explicitly coerce x.limits and x.at to numeric:
>
> ...
> xlim = as.numeric(x.limits),
> scales = list(x = list(alternating = T,
> at = as.numeric(x.at),
> labels = x.labels, tck=0)),
> ...

Thanks, Deepayan. I thought I had already thoroughly tried as.numeric around the chron objects, but apparently not.

Scott Waichler



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jun 02 05:32:06 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:20 EST