Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
abubelinha opened this issue Apr 8, 2022 · 5 comments
Open

Comments

@abubelinha
Copy link

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

@GuangchuangYu
Copy link
Owner

see hms-dbmi/UpSetR#112.

@abubelinha
Copy link
Author

Thanks, I will try

@lsilvam
Copy link

lsilvam commented Apr 14, 2022

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)

@abubelinha
Copy link
Author

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.

@lsilvam
Copy link

lsilvam commented Apr 15, 2022

So retrying UpSetR is not urgent for me anymore

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants