[R] Putting 2 breaks on Y axis
Jim Lemon
jim at bitwrit.com.au
Thu Apr 12 22:53:37 CEST 2007
Inman, Brant A. M.D. wrote:
> R plotting experts:
>
> I have a bivariate dataset composed of 300 (x,y) continuous datapoints.
> 297 of these points are located within the y range of [0,10], while 2
> are located at 20 and one at 55. No coding errors, real outliers.
>
> When plotting these data with a scatterplot, I obviously have a problem.
> If I plot the full dataset with ylim = c(0,55), then I cannot see the
> structure in the data in the [0, 10] range. If I truncate the y axis
> with ylim = c(0,10), then I cannot see the 3 outliers. If I break the y
> axis from 10 to 20 (using plotrix functions), I still do not see the
> data optimally because of the white space from y=20 to y=55.
>
> What I would like to do is break the y axis at 2 points, roughly 10-20
> and 20-55. Is there a function that can break an axis in 2 places?
>
Hi Brant,
gap.plot in the plotrix package can do one break, and it is possible to
do two, as gap.boxplot does. It wouldn't be too difficult to recode
gap.plot to get more than one break. I'll see what I can do today.
Jim
More information about the R-help
mailing list