[Rd] error in lattice formattedTicksAndLabels.Date (PR#9590)

jszinger at gmail.com jszinger at gmail.com
Thu Mar 29 18:10:24 CEST 2007

Full_Name: James Szinger
Version: 2.4.1
OS: linux and MacOS X
Submission from: (NULL) (

I'm trying to plot some data from the past 12 months and the lattice package is
not labeling the time axis correctly.  It shows only two labels instead of the
expected 12.  The base graphics get it right.  

I think the problem is the commented-out line in formattedTicksAndLabels.Date in
lattice's axis.R:
    ## z <- c(range, x[is.finite(x)])

The following example demonstrates the problem:

require(lattice)  #lattice_0.14-16

x <- rnorm(12)
t <- seq( as.Date("2006-04-01"),by="month", length=12)

plot(x~t)      # Has labels "May", "Jul", "Sep", "Nov", Jan", "Mar"
xyplot(x~t)    # Has labels "Jan", "Mar"

More information about the R-devel mailing list