Hi folks, I want to have a y-axis using matplot where the y axis is truncated as shown schematically below: (msecs) 3000 | x ~ ~ 800 | x | | x | ----|----|----|----------------- 1 2 3 Position The ~ is supposed to stand for a curved line showing a break. The issue is that I want to plot the points shown by the x's, but if I plot a continuous y axis then the confidence intervals about the points at positions 2 and 3 are not clearly visible... Can someone suggest how this might be done? I did study the manuals and contributed manuals first, and searched the archives and FAQs, just couldn't find any discussion of such a situation. Thanks much in advance, -- Shravan Vasishth Phone: +49 (681) 302 4504 Computational Linguistics, Universit?t des Saarlandes, Postfach 15 11 50 D-66041 Saarbr?cken, Germany http://www.coli.uni-sb.de/~vasishth
On Sat, 28 Jun 2003 14:03:27 +0200 (MEST) Shravan Vasishth <vasishth at coli.uni-sb.de> wrote:> Hi folks, > > I want to have a y-axis using matplot where the y axis is truncated as > shown schematically below: > > (msecs) > > 3000 | x > ~ > ~ > 800 | x > | > | x > | > ----|----|----|----------------- > 1 2 3 > Position > > The ~ is supposed to stand for a curved line showing a break. The issue is > that I want to plot the points shown by the x's, but if I plot a > continuous y axis then the confidence intervals about the points at > positions 2 and 3 are not clearly visible... > > Can someone suggest how this might be done? I did study the manuals and > contributed manuals first, and searched the archives and FAQs, just > couldn't find any discussion of such a situation. > > Thanks much in advance, > > -- > Shravan Vasishth Phone: +49 (681) 302 4504See W. Cleveland "The Elements of Graphing Data" (Hobart Press) for reasons not to do this. Consider using a nonlinear scale or making the graph taller. --- Frank E Harrell Jr Prof. of Biostatistics & Statistics Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat
> I want to have a y-axis using matplot where the y axis is truncated as > shown schematically below:One (not so elegant) way is this: # original data with one very large y value x <- c(1, 2, 3, 4, 5) y <- c(1000, 120, 110, 108, 104) plot(x,y) # truncated y-axis plot y <- c(140, 120, 110, 108, 104) plot(x,y, yaxt="n") axis(side=2, at=c(100, 105, 110, 115, 120, 140), labels=c(100, 105, 110, 115, 120, 1000)) rect(0, 130, 1, 131, col="white", border="white") par(xpd=T) lines(x=c(0.7,1), y=c(130, 130)) lines(x=c(0.7,1), y=c(131, 131)) -- Wolfgang Viechtbauer