[R] how to make lines() meet axis in autoscaled coordinate system?
graumann at its.caltech.edu
Fri Aug 27 00:11:36 CEST 2004
Thanks so much!
On Thu, 26 Aug 2004 18:15:44 -0300 (ADT)
Rolf Turner <rolf at math.unb.ca> wrote:
> Johannes Graumann wrote:
> > I have an auto-scaled coordinate system and would like to add some
> > clarifying lines to the graph - which ares supposed to meet the
> > axis.
> > >lines(c(0,time1,time1), c(1,1,0),lty=3)
> > does what I want, BUT the second leg does not touch the x-axis since
> > the auto-scaling of the y-axis does not start at'0' but slightly
> > negative. I could now adjust the line length by 'trial and error' to
> > suit my needs, but I'd prefer a generalizable solution like
> > >lines(c(<some_macro_for_y-axis_position>,time1,time1),
> > + c(1,1,<some_macro_for_x-axis_position>),lty=3)
> lines(c(par()$usr,time1,time1), c(1,1,par()$usr),lty=3)
> Rolf Turner
> rolf at math.unb.ca
More information about the R-help