[R] abline going out of bounds

Greg Snow Greg.Snow at imail.org
Wed Jul 1 19:25:24 CEST 2009


How are you creating the plots before adding the line?  This sounds like you may be mixing graphics types (creating the plots with grid graphics (lattice or ggplot2) then using abline from the base graphics system) or using a plot function that plays with the graphics settings and leaves them in a different state from when the plotting was done (filled.contour is one such function).

If you can show us the code that you are seeing the problem with, then it will be easier for us to help.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of rajesh j
> Sent: Wednesday, July 01, 2009 11:07 AM
> To: r-help at r-project.org
> Subject: [R] abline going out of bounds
> 
> Hi,
> I have a multiplot of 6 rows and 1 column.I need to draw vertical lines
> in
> each plot.However when I use abline(v=locator(1)$x) in some plots the
> line
> only comes for half the box and it goes beyond the box in others.I
> suspect
> this has something to do with the margins.any help?
> 
> --
> Rajesh.J
> 
> 	[[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.




More information about the R-help mailing list