ggbreak icon indicating copy to clipboard operation
ggbreak copied to clipboard

Extra lines created outside of plot after using scale_y_break

Open northcoastrat opened this issue 2 years ago • 2 comments

Hello,

I love how easy this package is to use. However, after I break my axis using scale_y_break, I get some lines that I cannot figure out how to remove. These get drawn between the axis labels and the graph. Do you know how to remove them?

Before break image

After break image

Russell

northcoastrat avatar Dec 05 '23 23:12 northcoastrat

Hi,

I'm having the same problem in generating figure.

Jing

wangjing8726 avatar Mar 07 '24 14:03 wangjing8726

Below is a reproducible example. I confirmed I observed the unwanted extra lines with {ggbreak} 0.1.2, R 4.3.3, and {ggplot2} 3.4.0, 3.4.2, and 3.5.1.

library("ggbreak")
packageVersion("ggbreak")
## [1] ‘0.1.2’
library("ggplot2")
packageVersion("ggplot2")
## [1] ‘3.4.0’

data("ToothGrowth")
ggplot(ToothGrowth) +
  aes(x = supp, y = len) +
  geom_bar(stat = "summary", fun = "mean") +
  scale_y_break(breaks = c(5, 15))

image

jdblischak avatar Jun 28 '24 19:06 jdblischak