How to add a mark in an axis break using ggbreak?

456 Views Asked by At

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?

0

There are 0 best solutions below