Susana Barbosa
2002-Jun-19 23:17 UTC
[R] function plot.double (different data on the same plot)
Hi, I would like to plot on the same graph vertical lines from points of two different data sets to the zero axis (x1,y1) and (x2,y2) (y1>0, y2<0) I tried to use function plot.double from Anne York, plot.double(x1, y1, x2, y2, type1="h", type2="h") but I obtain two different zero axis, and I wanted to plot vertical lines from data points to the same zero axis Any suggestions? Thank you! Susana Barbosa -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Ott Toomet
2002-Jun-20 06:19 UTC
[R] function plot.double (different data on the same plot)
Hi, On Thu, 20 Jun 2002, Susana Barbosa wrote: |Hi, | |I would like to plot on the same graph vertical lines from points of two |different data sets to the zero axis |(x1,y1) and (x2,y2) (y1>0, y2<0) I am not quite sure what you want, but the example below gives a picture which perhaps is good enough. Note that lines() can be used not only for lines: x <- rnorm(10) y <- rnorm(10) plot(1:10,x, type="h", ylim=range(c(x,y))) # plot x against 1:10 lines(1:10+0.1,y, type="h", col=2) # plot y shifted a bit right Perhaps it helps Ott -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._