[R] split a y-axis to show data on different scales
spencer.graves at pdf.com
Mon Aug 14 18:14:42 CEST 2006
The pro's and con's of using "scale breaks" were discussed by
Cleveland (1985) The Elements of Graphing Data (Wadsworth, pp. 85-91,
149). I don't know what Cleveland said about this is the second edition
of this book, but I believe there are times when scale breaks are
appropriate, but the display should make this nonstandard transition
very clear; otherwise, it can be seriously misleading.
Hope this helps.
Jim Lemon wrote:
> Rashmi Mathur wrote:
>> How do I split a y-axis to plot data on different scales?
>> x <- 1:10
>> y <- c(-0.01,0.79,0.74,0.55,-0.67,0.32,-0.47,-0.05,723,759)
>> I'd like to show these data on the same plot, but the way it's written, all
>> contrast in the first 8 data points is lost. Can R split a y-axis for me?
> Hi Rashmi,
> Although Hadley's answer is relevant (displaying vastly different ranges
> of data can be dangerous) you might find that gap.plot in the plotrix
> package will do the dirty deed.
> R-help at stat.math.ethz.ch mailing list
> 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