[R] a little (more) help needed plotting chron object

Randy Zelick zelickr at pdx.edu
Tue Nov 21 01:54:21 CET 2006


Hello Gabor,

Thanks very much for your help. The solution you offered:

>
> plot(tv, yjunk, pch = yjl, xaxt = "n")
> s <- seq(0, 1, .2)
> axis(1, s, substr(chron(s), 11, 15))
>

does provide time labels, but I can't seem to get a time less than 8:00. 
For example, if I try

s <- seq(0,1,(1/12)) and run chron on it, I get this OK result:

[1] (01/01/70 00:00:00) (01/01/70 04:00:00) (01/01/70 08:00:00)
[4] (01/01/70 12:00:00) (01/01/70 16:00:00) (01/01/70 20:00:00)
[7] (01/02/70 00:00:00)

I expected eight tics labeled 00:00, 04:00, etc. The axis command insists, 
however, in starting the xaxis no earlier than 8:00. Various adjustments 
of the range parameters do not seem to help.

Perhaps 'axis' has a notion about spacing labels and I am fighting that, 
but then it was told via "s" where to put the tics!

Thanks, again, in advance,

=Randy=

R. Zelick				email: zelickr at pdx.edu
Department of Biology			voice: 503-725-3086
Portland State University		fax:   503-725-3888

mailing:
P.O. Box 751
Portland, OR 97207

shipping:
1719 SW 10th Ave, Room 246
Portland, OR 97201



More information about the R-help mailing list