1

I'd like to add a mark to notify the break in my axis as in the graph below.

Example break mark in axis

By using the dataset iris, here is the code.

p <-
 ggplot(iris, aes(x=Species, y=Sepal.Length)) + 
  geom_boxplot() +
  theme_classic() + 
  theme(axis.text.y.right = element_blank(), axis.ticks.y.right = element_blank(), 
        axis.line.y.right = element_blank(),
  ) +
  scale_y_break(c(4.5, 5.0)) + 
  scale_y_continuous(limits = c(0, 15))

How can I add something to notify the break in the axis as in the image above?

IsoE
  • 11
  • 2
  • Could you please share some reproducible data using `dput`? So we can help you better. – Quinten Mar 17 '23 at 15:19
  • I used the dataset 'iris' to get a reproducible example. I hope it helps. – IsoE Mar 17 '23 at 18:03
  • 1
    Maybe take a look at [this answer](https://stackoverflow.com/a/61082435/3460670) as well as the [ggh4x package](https://github.com/teunbrand/ggh4x) – Ben Mar 19 '23 at 13:36

0 Answers0