Re: [R] plot(..., type="h") w/ origin not at y=0

About this list Date view Thread view Subject view Author view Attachment view

From: Uwe Ligges (ligges@statistik.uni-dortmund.de)
Date: Fri 28 Jun 2002 - 03:40:22 EST


Message-id: <3D1B4E06.A741529@statistik.uni-dortmund.de>


Peter Dalgaard BSA wrote:
>
> Cyril Humbert <humbertc@univ-mlv.fr> writes:
>
> > Is it a way to make plots with vertical lines, like plot(x, y, type="h"),
> > but starting from a different value than y=0.
> >
> > For example, with x=1:3, y=-(1:3), y.orig=-3 :
> >
> > -1 |
> > |
> > y -2 | |
> > | |
> > -3 | | |
> > 1 2 3
> > x
> >
>
> You might subtract y.orig from the data and add it to the axis labels....

Or see ?segments:
 plot(x, y, type="n")
 segments(x, y, x, y.orig)

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Wed 16 Oct 2002 - 11:57:34 EST