Hi,

I have a basic question about aligning date labels for the x-axis
in an xyplot so that they align with the grid lines
from the panel.grid argument.

For example, with

x <- data.frame(
  date = seq(as.Date("2005/01/01"), as.Date("2006/06/01"), 
  length.out = 20), value = runif(20))
xyplot(value ~ date, data = x,
  panel = function(x, y, subscripts, ...)
  { panel.grid(h = -1, v = -1, col = "grey", lwd = 1, lty = 1)
    panel.xyplot(x, y, ...)
  }) 

How can I get the labels on the x-axis to align 
with the vertical grid lines?
i.e. I have 6 vertical grid lines by default (v = -1)
in this example so I would like 6 labels along the x-axis
at the same points, whereas I see only 2 (2005 and 2006).

As an alternative I would be happy to just specify the number of labels
as long as panel.grid's vertical lines aligned with the labels.

> R.version.string
[1] "Version 2.3.1 (2006-06-01)"

on Windows NT4.

Regards,

John.

John Gavin <[EMAIL PROTECTED]>,
Commodities, FIRC,
UBS Investment Bank, 2nd floor, 
100 Liverpool St., London EC2M 2RH, UK.
Phone +44 (0) 207 567 4289
This communication is issued by UBS AG or an affiliate ("UBS...{{dropped}}

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to