[R] Plotting with dates on X axis

M. Lang & S. Railsback LRA at northcoast.com
Thu Apr 6 00:47:38 CEST 2000


Is there a trick to drawing a graph with date-formatted values as one of
the axes?  Here is my code:

  library(date)
  MortDate <-as.date(MortalityDate)
  
  ...

  plot(MortDate,AqPred,type="l", xlim=range(MortDate), ylim=c(0,MaxY))

The plot actually has the formatted date values as the X axis labels,
but they are overwritten by unformatted (integer) Julian dates. 

Then the vector of Julian dates appears underneath the plot as:

 c(14611, 14611, ...

and so on for two lines.

Using the plot parameter xaxt = "t" does not help. 
I'm using R1000 for Windows.

Thanks

Steve Railsback
-- 
LRA at NORTHCOAST.COM
Lang, Railsback & Assoc.
250 California Ave., Arcata CA 95521
707-822-0453; Fax 822-1868
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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