[R] Truncating y axis

Frank E Harrell Jr fharrell at virginia.edu
Sat Jun 28 14:32:39 CEST 2003


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 4504

See 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




More information about the R-help mailing list