[R] Plots using POSIX

Shawn Way sway at tanox.com
Thu Jun 26 14:59:00 CEST 2003


Is there a reason that the bottom axis changes color when POSIX data is used
in plot function?

For example:

> timedata <- c("2/3/2003","3/4/2003","5/4/2003")
> timedata2 <- strptime(timedata,format="%m/%d/%Y")
> numdata <- c(2,3,4)
> plot(as.POSIXct(timedata2),numdata,col="red",type="o")

As compared to:

> numdata2 <- c(3,4,5)
> plot(numdata2,numdata,col="red",type="o")

I assume that the work around is to place the box and axis after the plot is
created, correct?

Shawn Way
Engineering Manager
Tanox, Inc.




More information about the R-help mailing list