Xinglab / rMATS-long

Other
23 stars 2 forks source link

bug, 'legend' lost in 'visualize_isoforms.R' #15

Closed gnilihzeux closed 7 months ago

gnilihzeux commented 7 months ago

Hi, there is a bug at line 72 in 'visualize_isoforms.R'

old, which could not raise a legend

legend_plot <- cowplot::get_legend(prop_with_legend_plot)

![Uploading 1712913470693.png…]()

I try in other way

legend_plot  <- ggplotGrob(prop_with_legend_plot)$grobs[[which(sapply(ggplotGrob(prop_with_legend_plot)$grobs, 
                                                                          function(x) x$name == "guide-box"))]]

![Uploading 1712913417844.png…]()

EricKutschera commented 7 months ago

From https://github.com/wilkelab/cowplot/pull/200 it looks like a known issue that cowplot::get_legend() doesn't work with ggplot2 3.5.0

It also looks like an update to cowplot is being worked on: https://github.com/wilkelab/cowplot/issues/202

I checked that using ggplot2 3.4.4 still works. I'll give some time for a cowplot update before making any changes to the code

gnilihzeux commented 7 months ago

Thanks a lot.