const-ae / ggupset

Combination matrix axis for 'ggplot2' to create 'UpSet' plots
352 stars 25 forks source link

doesn't supporting the github version of ggplot2 #33

Open xiangpin opened 2 years ago

xiangpin commented 2 years ago

Hello Thanks for the great package. the ggplot2 is a very popular package. ggupset seem to be developed based on it. But now ggplot2 has some significant changes. and the ggupset is compatible with it.

> library(ggplot2)
> library(ggupset)
> packageVersion('ggplot2')
[1] ‘3.3.6.9000’
> packageVersion('ggupset')
[1] ‘0.3.0’
> example(scale_x_upset)

scl_x_> library(ggplot2)

scl_x_> ggplot(tidy_movies[1:100, ], aes(x=Genres)) +
scl_x_    geom_bar() +
scl_x_    scale_x_upset(reverse = TRUE, sets=c("Drama", "Action"))
Hit <Return> to see next plot:
Error: Discrete value supplied to continuous scale
> example(theme_combmatrix)

thm_cm> library(ggplot2)

thm_cm> # Ensure that the y-axis label is next to the axis by setting
thm_cm> # combmatrix.label.make_space to FALSE
thm_cm> ggplot(tidy_movies[1:100, ], aes(x=Genres)) +
thm_cm    geom_bar() +
thm_cm    scale_x_upset() +
thm_cm    theme_combmatrix(combmatrix.label.text = element_text(color = "black", size=15),
thm_cm                     combmatrix.label.make_space = FALSE,
thm_cm                     plot.margin = unit(c(1.5, 1.5, 1.5, 65), "pt"))
Hit <Return> to see next plot:
Error: Discrete value supplied to continuous scale
const-ae commented 2 years ago

Hi Shuangbin Xu,

thanks for alerting me to this. I agree it's worrisome if the next ggplot release will break ggupset and I will keep an eye on it. Unfortunately, I currently don't have the spare capacity to investigate this issue myself and figure out if it is a simple 1-line fix or will entail a more complete rewrite of ggupset. Sometimes the ggplot developers provide some advice how to transition to the new version if they include breaking changes. So I will take a wait-and-see approach for now.

Best, Constantin

xiangpin commented 2 years ago

ok, thanks, I found this issue seems similar to the ggside.