[R] horizontal and vertical line with arrow in a plot

From: Roslina Zakaria <zroslina_at_yahoo.com>
Date: Thu, 03 Jun 2010 20:34:01 -0700 (PDT)


Hi r-users,

I would like to add a plot of vertical line segment with arrow from (77,.6) to (77,0) and also a horizontal  line segment with arrow from (0,0.6) to (77,.6) .  So far this is what I have:

plot(sq, cdf, type="l", lwd=4,col="blue",xaxs="i",yaxs="i", xlab= "Rainfall (mm)", ylab= "Random no.", main="Random number  and rainfall totals (mm)") abline(v=77,h=0.6,col=2,lwd=2,lty=3)
text(120,0.63, "r = 0.6")
text(120,0.05, "x = 70")

I also tried to use the 'diagram' and 'shape' package but not really sure how to use them.

Thank you for all the help given.

      
	[[alternative HTML version deleted]]


______________________________________________

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. Received on Fri 04 Jun 2010 - 03:37:13 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 04 Jun 2010 - 17:10:27 GMT.

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

list of date sections of archive