Paul Matthias Diderichsen wrote:
> Dear S-plus Gurus,
> somebody asked me to do a xyplot of some data versus time. No problem, I
> said. Then, they told me that the ticks and labels along the time axis
> (abscissa) were to be multiples of 24 (hours). No problem, I repeated,
> anticipating none. But - alas - it did turn out to be a problem.
>
> Please let me know if you have any ideas how to accomplish this - dirty
> workarounds are accepted. ;-) Also please tell me, if you are relatively
> sure that this can not be done. More generally, I am looking for a
> solution similar to matlab's XTick=[vector of positions on the axes
> where ticks are to appear] and XTickLabels={array of strings}.
See the scales argument on ?trellis.args. For example:
library(trellis)
X <- runif(20)
Y <- rnorm(20)
xyplot(Y ~ X, scales=list(x = list(at = seq(0,1,.1), labels=LETTERS[1:11])))
--
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894
|