i have this data and plot
mydata <- data.frame(a=c(1:5),b=c(6:10),c=c(11:15),e=c(16:20))
plot <- stripchart(mydata, method="jitter", vertical=T,main='plot',pch=19)
I would like to subset the x axis into two labels named 'a+b' and 'c+d' labels
Thanks in advance
In your case you can simply use
mtext
on side 1:Argument
line
is to set up the vertical position andat
the position on the x-axis.Edit: To add a distance between the two groups, you can do like this (there may be a cleaner way to do that but that's the only one I can think of from the top of my head):
Argument
at
ofstripchart
is the one to fiddle with, but you then have to modify the plot limits (xlim
) and the x-value at which you write the axis label (inmtext
).