[R] gap.plot() and axes=F

Verena Hoffmann hoffmann at ibe.med.uni-muenchen.de
Tue Aug 12 11:27:05 CEST 2008


Hello!
Using the package Plotrix I want to do a plot with a broken axis.
So far it's working fine but now I want only the x and y axis plotted 
(the x-axis with a gap in it), but not the axes that are reffered to as 
axis 3 and 4, and not the lines that additionally mark the gap in the axis.
I thought an 'axes=F' in the gap.plot() command would do (as in the 
usual plot()), but it does not.
The second problem is, that I only can label the ticks before the break 
in the x-axis.

That's what I do now:
library(plotrix)
a<-c(1,2,3,4,5,6, 51,66,67,68,69)
b<-c(1,2,3,4,5,6,7,8,9,10,11)
gap.plot(a,b,gap=c(10,49), gap.axis="x" )
axis(1, at=c(1,2,3,4,5,6,7,8,9,50,55,60,65,70))
axis.break(axis=1,9.5,style="slash", brw=0.03, breakcol="red")


Thankful for advice,
Verena Hoffmann



More information about the R-help mailing list