2

I made an upset plot using the ggupset package and added a break to the y axis with scale_y_break from the ggbreakpackage.

However, when I add scale_y_break, the combination matrix under the bar plot disappears.

Is there a way to combine the combination matrix of the plot made without scale_y_break with the bar plot portion of a plot made with scale_y_break? I can't seem to be able to access the grobs of these plots or use any other workaround. If anyone could help, I would greatly appreciate it!

Example with scale_x_upset and scale_y_break:

df = tidy_movies %>% distinct(title, year, length, .keep_all=TRUE)

ggplot(df, aes(x=Genres)) + geom_bar() + scale_x_upset(n_intersections = 20)+ scale_y_break(breaks = c(750,1000))

I would like to combine the barplot portion of the plot created with:

df = tidy_movies %>% distinct(title, year, length, .keep_all=TRUE)
ggplot(df, aes(x=Genres)) +  geom_bar() + scale_x_upset(n_intersections = 20)+ scale_y_break(breaks = c(750,1000))

with the combination matrix portion of the plot made with:

df = tidy_movies %>% distinct(title, year, length, .keep_all=TRUE)
ggplot(df, aes(x=Genres)) +  geom_bar() + scale_x_upset(n_intersections = 20)

Thanks!

erikagucci
  • 21
  • 1

0 Answers0