Hi,
I am trying to use rect (R2.11) to plot a set of data as following
 
 
 > data
  Company        Pt                  Pri                  Pub
1    A            WO520          8/5/09          2/11/10
2    B            WO893         7/30/03          2/24/05
3    A            WO258         12/8/08          6/17/10
4    C           WO248         1/13/09           9/2/10


pri<- strptime(pri,"%m/%d/%y")
pub <- strptime(pub,"%m/%d/%y")

plot.new()
plot.window(xlim=c(min(pri,pub),max(pri,pub)),ylim=c(0,length(company)-1))
%y <- seq(0,0.5*(length(company)-1),0.5)
%h <- 0.1
%rect(pri, y-h, pub, y+h, col=c("light blue","pink","yellow","red"))
 
Neither xlim nor rect/boxplot recognizes pri/pub with date format. I wonder if 
there is a good way to deal with the date ploting so the x-axis can reflect the 
actual time range.
 
Thank you,
Eric
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to