Thursday, November 25, 2010

add axis break

i have done it with the plotrix package.

First plot the graph. Then you can add the breaks with axis.break(axis, breakpos,style). There are some more parameters, check out ?break.axis.

Here is my example:
pdf("WHRboys.pdf")
qtplot(fitwhrm, per = c(3,10,25,50,75,90,97), pcol = 1, ylab = "WHR", xlab="Age (years)", pcex = 0.25, pch = 15, lwd = 2, tadj = 1, label = T, lcol.arg=colors, tcol=colors)
axis.break(1,7.7, style="slash", brw=0.012)
axis.break(2,0.643, style="slash", brw=0.012)
dev.off()

No comments :

Post a Comment