UpSetR
UpSetR copied to clipboard
combine two UpsetR plots into 1
Thank you for creating this great, one of the most useful packages that I have come across in R.
I did not see anyone asking this (sorry if it was answered somewhere within the threads), but I was wondering if there is an easy way to combine two plots - created one at a time using the 'upset' function - into a single plot (two plots side by side or arranged top-bottom)? I have tried almost everything from basic R commands to ggplot functions but I haven't been able to accomplish it. I can indeed combine them outside of R but the image quality drops significantly.
Hello JakeConway,
I agree with Berge2015, I'd love to generate side-by-side plots. However, I kind of want to see that taken a step further kind of like the following from geom_bar's help page :
The reason this is great is because it allows you to easily compare things from the same class. In upset, this means we could easily compare set occupancies from different datasets.
For example, I am using UpSet to plot data from Cytometry experiments. Cytometry experiments tell you whether or not a cell has a protein. 100s of proteins and 10,000s of cells are measured in a single experiment. The data from these experiments are difficult to visualize in a conceptually meaningful way, but UpSet provides a great solution.
However, I really want to compare experiments: control versus disease, for example. If UpSet gains the functionality to compare multiple Cytometry experiments, I think a lot of immunologists will want to try it out on their data!
Hello radlinsky,
Thanks for the suggestion of the dodged bar plot. I will try to implement it within the next week.
Hey Jake,
Any progress on the dodging feature? I'd love to use it in some of my figures!
-R
Hey Jake,
Any news?
Thanks!
-R
You can merge 2 upSet figures together using the following:
upset(...) grid.edit('arrange',name='arrange2') vp = grid.grab() grid.arrange(vp,vp)
Ideally, these gtree objects would be named in the R code to avoid the grid.edit step -- also this would allow the use of grid.grabExpr() rather than grid.grab()
Thanks emmesgit! That's a neat trick.
However, your grid.arrange() solution doesn't scale quite as well as dodged barplots would...
Agree w/ Radlinksy - would be a great feature! SUPER helpful!
bump
Annual bump lol
+1