[R] y-axis with "break"
Uwe Ligges
ligges at statistik.uni-dortmund.de
Fri Aug 23 18:37:22 CEST 2002
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list