0

I have a following "beeswarm" (a single-dimensional scatterplot)

library(beeswarm)
data(breast)
beeswarm(breast$time_survival,horizontal=TRUE)

Here is the resulting plot:

enter image description here

How can I get rid of the axes and the box around the plot, so that I can reintroduce only the X axis and nothing else around it?

Julio Diaz
  • 9,067
  • 19
  • 55
  • 70
Oposum
  • 1,155
  • 3
  • 22
  • 38

2 Answers2

2

If you create an empty plot first

plot(rnorm(10), type="n", axes=FALSE, xlim=c(0, 200), ylim=c(0.4, 1.6), 
     xlab="", ylab="")

Then you can use the add argument to get what you want

beeswarm(breast$time_survival,horizontal=TRUE, add=TRUE)
csgillespie
  • 59,189
  • 14
  • 150
  • 185
2

You can use the "axes" argument (described in ?plot.default).

beeswarm(breast$time_survival, horizontal=TRUE, axes = FALSE)