[R] Formatting POSIXt values in plot axis labels

Ronnen Levinson RML27 at cornell.edu
Mon Aug 5 23:23:07 CEST 2002


Hello.

I have an XYY series that I would like to graph with matplot() or some
other single function that will do the trick.
The X in question is a vector of POSIXt values obtained from strptime().

Is it possible to tell matplot() how to handle POSIXt x values?

I have examined the examples at
http://lark.cc.ukans.edu/~pauljohn/R/statsRus.html#5.22 , but would
prefer not have to overlay the results of multiple plot() calls.

Example:

a=strptime("06/01/2002 12:00:00","%m/%d/%Y %H:%M:%S")
x=seq(a,a+10*24*3600,length=3)
y=seq(1,4)
plot(x,y)
matplot(x,cbind(y,y))

I have also noticed that plot() seems to make judgement calls as to how
to present POSIXt values. For example,

a=strptime("06/01/2002 12:00:00","%m/%d/%Y %H:%M:%S")
x=seq(a,a+3*24*3600,length=3)
y=seq(1,4)
plot(x,y)

shows days of week. Is there a way for me to give plot() and/or
matplot() formatting instructions for POSIXt values?

Thanks,

Ronnen.

R1.5.1 on Windows 98

--
Ronnen Levinson, Ph.D.            \/      RML27 at cornell.edu
scientist                         ||      http://ronnen.com
Lawrence Berkeley National Lab    /\      fax 425.955.1992

======================================
Men in colored shirts and seersucker suits, women in slacks and midriff
dresses displaying
various grades of abdomen, moved in and out of California Spanish shops
and office buildings.
Nobody looked at the mountains standing above the town, but the
mountains were there,
making them all look silly.

-- Ross Macdonald, "The Moving Target"
======================================


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list