[R] Plotting lines and points on the second plot when using gap.plot in plotrix
michael watson (IAH-C)
michael.watson at bbsrc.ac.uk
Wed Jul 19 12:58:08 CEST 2006
Hi
My question is simple - the gap.plot function in the plotrix package
allows users to draw graphs that have a broken axis. However, I want to
then add a line to the "second" plot, but can't.
Eg:
twogrp<-c(rnorm(10)+4,rnorm(10)+20)
gap.plot(twogrp,rnorm(20),gap.bounds=c(8,16),gap.axis="x",xlab="X
values",
xtics=c(4,7,17,20),ylab="Y values",main="Plot gap on X axis")
# this doesn't work
points(17,0,col="red")
# this does work
points(4,0,col="green")
I somehow need to set the focus to the second plot so that I can draw
lines and points on it.
Any help?
Mick
More information about the R-help
mailing list