[R] abline(v= x) in plot with time formated xaxis not working
Patrick Connolly
p_connolly at slingshot.co.nz
Sun Jul 19 07:17:18 CEST 2009
Dear Fritz,
(had to guess the name as well as most of the other things not given)
On Wed, 15-Jul-2009 at 02:25PM -0700, F!! wrote:
|>
|> Hi,
|>
|> I try to create a vertical line in my plot, which has a xaxis comprising
|> time formated data.
|>
|> This is what I tried:
|>
|> ----------------
|>
|> y<-152833
|> x<-strptime(y, format="%H%M%S")
|>
|> abline(v=x, col="red")
|>
|> ----------------
|>
|> for some reason, it doesn't work and no error msg is displayed...
My guess is that you don't already have a plot, or if you do, your
value of x is outside the range it covers.
Try par()$usr and see if my guess is correct. There's no way I can
tell.
|>
|> I hope someone can tell me what I do wrong, or maybe an alternative.
If you had a reproducible example, they'd be in a better position.
|> ______________________________________________
|> R-help at 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.
Notice the last line?
--
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
___ Patrick Connolly
{~._.~} Great minds discuss ideas
_( Y )_ Average minds discuss events
(:_~*~_:) Small minds discuss people
(_)-(_) ..... Eleanor Roosevelt
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
More information about the R-help
mailing list