s-news
[Top] [All Lists]

Re: axes tick labels

To: Paul Matthias Diderichsen <paulmatthias.diderichsen@abbott.com>
Subject: Re: axes tick labels
From: Chuck Cleland <ccleland@optonline.net>
Date: Wed, 16 Aug 2006 06:13:46 -0400
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <OF5C4A68DA.C275AD2B-ONC12571CC.0035B029-C12571CC.00365988@abbott.com>
References: <OF5C4A68DA.C275AD2B-ONC12571CC.0035B029-C12571CC.00365988@abbott.com>
User-agent: Thunderbird 1.5.0.5 (Windows/20060719)
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

<Prev in Thread] Current Thread [Next in Thread>
  • axes tick labels, Paul Matthias Diderichsen
    • Re: axes tick labels, Chuck Cleland <=