y-axis with "break"
I don't have anything better than Uwe suggested, but I did write an "axis.break()" function at one point that inserts the actual break in the axis -- let me know if you want it. Ben Bolker
On Fri, 23 Aug 2002, Uwe Ligges wrote:
Nicolas Schneider wrote:
Dear R-users I would like to draw a barplot with a special y-axis. Most of my data points are in the range from -50 to 50, apart from one value that is 550. I would now like to have a y-axis from -50 to 50, then a "break" and the "rest" of the y-axis, let's say from 500 to 600. In order to make clear what I'm trying to do, I attached a figure. Is it possible to do this in R?
Not really, I think. What you can do, e.g., is that ugly trick along the
following lines:
barplot(c(-50, 50, 450 - 300, 50), ylim=c(-150, 200), yaxt="n")
axis(2, seq(-150, 200, 50), labels = c(seq(-150, 100, 50), 450, 500))
lines(rep(par("usr")[1], 2), c(100, 150), col="white", lty="dashed")
Better solutions are welcome!
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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
318 Carr Hall bolker at zoo.ufl.edu Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker Box 118525 (ph) 352-392-5697 Gainesville, FL 32611-8525 (fax) 352-392-3704 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._