Re: [R] Vertical Line on Plot

From: Barry Rowlingson <B.Rowlingson_at_lancaster.ac.uk>
Date: Fri 26 May 2006 - 02:45:15 EST

Peter Lauren wrote:
> I was wondering what would be the best way to put a
> vertical line on a graph made with plot(). I can get
> an horizontal line by plotting a vector where every
> element has the same value but it is not as clear how
> a vertical line should be done.
>

  abline(v=42)

you can use it for horizontal lines too: abline(h=42) and several other things. See help(abline) for details.

Barry



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri May 26 02:48:27 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 26 May 2006 - 06:10:22 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.