plot(3:10,main="Axis break test")
# 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="Two separated groups with gap axis break")
par(ask=FALSE)
Run the code above in your browser using DataLab