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

combine two UpsetR plots into 1 #63

Open
berge2015 opened this issue Jan 22, 2017 · 11 comments
Open

combine two UpsetR plots into 1 #63

berge2015 opened this issue Jan 22, 2017 · 11 comments

Comments

@berge2015
Copy link

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.

@radlinsky
Copy link

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 :

image

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!

@JakeConway
Copy link
Member

Hello radlinsky,

Thanks for the suggestion of the dodged bar plot. I will try to implement it within the next week.

@radlinsky
Copy link

Hey Jake,

Any progress on the dodging feature? I'd love to use it in some of my figures!

-R

@radlinsky
Copy link

Hey Jake,

Any news?

Thanks!

-R

@emmesgit
Copy link

emmesgit commented Jun 6, 2017

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()

@radlinsky
Copy link

Thanks emmesgit! That's a neat trick.

However, your grid.arrange() solution doesn't scale quite as well as dodged barplots would...

@psudmant
Copy link

Agree w/ Radlinksy - would be a great feature! SUPER helpful!

@radlinsky
Copy link

bump

@radlinsky
Copy link

Annual bump lol

@BrunildaBalliu
Copy link

+1

@kajolbm
Copy link

kajolbm commented May 30, 2024

Is it resolved? Any idea on how to merge the upset plot in one in an up/down manner?? I am still struggling with this in UpsetR

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

7 participants