axis.break {plotrix} | R Documentation |
Places a "break" mark on an axis on an existing plot
axis.break(axis=1,breakpos=NULL,bgcol="white",breakcol="black", style="slash",brw=0.02)
axis |
which axis to break |
breakpos |
where to place the break in user units |
bgcol |
the color of the plot background |
breakcol |
the color of the "break" marker |
style |
Either gap , slash or zigzag |
brw |
break width relative to plot width |
There is some controversy about the propriety of using discontinuous
coordinates for plotting, and thus axis breaks. Discontinuous coordinates
allow widely separated groups of values or outliers to appear without
devoting too much of the plot to empty space. The major objection seems
to be that the reader will be misled by assuming continuous coordinates.
The gap
style that clearly separates the two sections of the plot
is probably best for avoiding this.
nil
Jim Lemon and Ben Bolker
plot(3:10) # put a break at the default axis and position axis.break() axis.break(2,2.9,style="zigzag") if(dev.interactive()) par(ask=TRUE) twogrp<-c(rnorm(10)+4,rnorm(10)+20) gap.plot(twogrp,gap=c(8,16),xlab="Index",ylab="Group values", main="Plot two separated groups") par(ask=FALSE)