To remove ticks, you need to specify the width of the tick line as zero (lwd.ticks = 0). To ensure that the x and y axes match, it will be much harder for you
- specify the lower limit of the axis y, using ylim = ...
- specify the height of the axis of x, using pos = ...
- expanding the x-axis to the axis y - one way is to simply add a horizontal line using abline.
Combining it all together for the example above:
x <- 1:5 boxplot(x, frame.plot = FALSE,ylim=c(0,5)) axis(side=1, pos=0, lwd.ticks=0) abline(h=0) ylim = c (0,5)) x <- 1:5 boxplot(x, frame.plot = FALSE,ylim=c(0,5)) axis(side=1, pos=0, lwd.ticks=0) abline(h=0)

source share