ggplotify icon indicating copy to clipboard operation
ggplotify copied to clipboard

how to save the full UpSetR output? (left part of the graph missing)

Open abubelinha opened this issue 4 years ago • 5 comments

Sorry, I have not experience using ggplotify. I discovered it because I need my script to save UpSetR output to a png file. So I tried to adapt some code from comments in this UpSetR issue:

library("UpSetR")
listInput <- list(
  one = c(1,2,3,5,7,8,11,12,13), 
  two=c(1,2,4,5,10), 
  three=c(1,5,6,7,8,9,10,12,13)
  )
upset(fromList(listInput), order.by="freq")

library(ggplotify)
as.ggplot(upset(fromList(listInput), order.by="freq"))

But (as also reported in the original issue) something is wrong with that because the left part of upset graph is missing. How should I change the code to get the full UpSetR graph and save it to a png file?

Thanks a lot in advance for your help

original UpSetR output:

image

with ggplotify:

image

abubelinha avatar Apr 08 '22 09:04 abubelinha

Thanks, I will try

abubelinha avatar Apr 13 '22 06:04 abubelinha

Thanks, I will try

did you get it? I am having the same problem. Maybe I missed something here:

see hms-dbmi/UpSetR#112.

But I noticed that the labels of the sets show up if the width of the final image increases when using: ggsave(plot_upset, units = "cm", width = 30, height = 11, dpi = 300)

lsilvam avatar Apr 14 '22 17:04 lsilvam

did you get it? I am having the same problem.

Not yet. I was calling R from Python and I had already found other easier to configure upset packages (upsetplot, complex-upset). So retrying UpSetR is not urgent for me anymore.

abubelinha avatar Apr 15 '22 07:04 abubelinha

So retrying UpSetR is not urgent for me anymore

I see. and I will just manually export, for now

lsilvam avatar Apr 15 '22 10:04 lsilvam