I want to create a plot by breaking the x axis at 3.5, and 9.5 .I found the following code which i have updated according to my data points
x <- c(0.1,0.6,1.5,2.8,10.2,11.8,13.9,14.9,12.5,14.5)
y <- c(1.1,1.8,2.1,5.6,11.2,13.8,10.2,11.1,4.5,9.5)
par(bty="n") # deleting the box
p=gap.plot(x,y, gap=c(3.5,9.5), gap.axis="x", pch=16,
col="blue", ylim=range(c(y)),
xtics=c(0:3,10:15), xticlab=c(0:3,10:15))
abline(v=seq(1.99,2.09,.001), col="white")
axis.break(1,2,style="slash")
I am not understanding the last two lines of the code when I used the last line of the code it gives the break after 1 and before 2 so I modified the code as
axis.break(axis = 1, breakpos=3.5 ,style="slash")
I have no idea how to use the abline to hide the vertical line which i get as seen in the below picture
question from:
https://stackoverflow.com/questions/65886030/breaking-the-x-axis 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…