[R] abline outside of plot region

From: Nick Sabbe <nick.sabbe_at_ugent.be>
Date: Fri, 29 Apr 2011 15:14:44 +0200


Hi R people.  

I ran into this problem: I created a plot with errbars, like this:

> errbar(x=c(1,2,3,4), y=c(2,1,3,3), yminus=c(1.5,0.5,2.5,2.5),
yplus=c(2.5,1.5,3.5,3.5))

Next, I wanted to accentuate some x value with an abline, like this:

> abline(v=2)
 

In one of my R sessions (which admittedly I have had open for quite a while now), the abline draws outside of the plotting region of errbars (till the edge of my plotting window at least).

I tested for the cause by opening another session (clean) of the same version of R (2.13), and running the same set of commands. In this session, I do not have this behavior. Conclusion: I must have changed some graphical parameter in my original session, but I don't know which one. Do you?  

As an addendum: I also want to add a few specific axis ticks besides the standard ones in my graph. I used axis for this, and it works. I set col.ticks to match the color of my abline (in the nonsimplified code), and this works too, but unfortunately, the label below the tick is not in this color, and a parameter for this is not present in axis.  

Suggestions for either? Note: I'm on windows 7 with R 2.13.  

Nick Sabbe

--

ping: nick.sabbe_at_ugent.be

link:  <http://biomath.ugent.be/> http://biomath.ugent.be

wink: A1.056, Coupure Links 653, 9000 Gent

ring: 09/264.59.36

 

-- Do Not Disapprove

 


	[[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 29 Apr 2011 - 13:19:01 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 Sat 30 Apr 2011 - 08:50:34 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