3

How to extract the y-axis labels from the boxplot in R?

Example,

bxp = boxplot(1:100)

The y-axis labels are 0, 20, 40, 60, 80, 100. I wonder how to extract this programmingly?

WCMC
  • 1,602
  • 3
  • 20
  • 32
  • 1
    Probably `?axTicks` - run `axTicks(2)` when the plot is still open. I thought this had to be a duplicate, but I'm struggling to find one now. – thelatemail Apr 25 '18 at 22:13
  • @thelatemail THANKS A LOT. I couldn't find any, not just in cross validated, but also in google.. – WCMC Apr 25 '18 at 22:23

1 Answers1

3

?axTicks should do it, so long as the resulting boxplot graphics device window is still open:

axTicks(2)
#[1]   0  20  40  60  80 100
thelatemail
  • 91,185
  • 12
  • 128
  • 188