From ligges at statistik.uni-dortmund.de  Sun Aug 31 16:15:50 2003
From: ligges at statistik.uni-dortmund.de (Uwe Ligges)
Date: Sun Aug 31 15:15:18 2003
Subject: [Rd] Bug in plot() with POSIX dates (PR#4024)
In-Reply-To: <200308301438.h7UEcUJH006448@pubhealth.ku.dk>
References: <200308301438.h7UEcUJH006448@pubhealth.ku.dk>
Message-ID: <3F51F506.8020706@statistik.uni-dortmund.de>

mail@fwr.on.ca wrote:

> When I do this (highly simplified example):
> 
> plot(as.POSIXct(c("1984-01-01","1984-01-02")), c(1,2), col=2)
> 
> I get a partially red (col=2) x-axis between and including the first and last tick marks. 
> Otherwise ok. Only happens with POSIXct or POSIXlt dates.

This one has already been fixed in r-patched and r-devel (to be R-1.8.0).


> Also, POSIX dates cannot be used on the y-axis?  
> POSIXlt gives an error, and POSIXct is unformatted.  

[That's a question for r-help, not appropriate for a bug report.]

?plot.POSIXct points you to a function axis.POSIXct() to be used as in:

  plot(c(1,2), as.POSIXct(c("1984-01-01","1984-01-02")), yaxt="n")
  axis.POSIXct(2, as.POSIXct(c("1984-01-01","1984-01-02")))

Uwe Ligges


> Bruce
> 
> Using X11 V4.2
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel


[Rd] Bug in plot() with POSIX dates (PR#4024)
Uwe Ligges