gg.gap icon indicating copy to clipboard operation
gg.gap copied to clipboard

Problem using gg.gap with facets

Open almeidasilvaf opened this issue 4 years ago • 0 comments

When I use facets and gg.gap, it splits the plot in two (each plot with the facet title) instead of just adding a gap. The same issue can be noticed with the example code provided by the developer. I don't think it was intended, because no one would add such a strange plot.

Code:

library(ggplot2)
library(gg.gap)
p <- ggplot(mtcars,aes(mpg,hp)) + geom_point()
p1 <- p + facet_wrap(~cyl, scales="free")
gg.gap(plot = p1,ylim = c(60,200), segments = c(100,120))

Figure:

gg gap facet

The facet titles ("4", "6" and "8") should be only one.

almeidasilvaf avatar Apr 26 '20 19:04 almeidasilvaf