Skip to content

set unique arrange id for each panel#112

Open
GuangchuangYu wants to merge 2 commits into
hms-dbmi:masterfrom
GuangchuangYu:master
Open

set unique arrange id for each panel#112
GuangchuangYu wants to merge 2 commits into
hms-dbmi:masterfrom
GuangchuangYu:master

Conversation

@GuangchuangYu

@GuangchuangYu GuangchuangYu commented Apr 24, 2018

Copy link
Copy Markdown

this PR solve the issue on #63, making it possible to capture complex UpSet plot like:

upset(movies,attribute.plots=list(gridrows=60,plots=list(list(plot=scatter_plot, x="ReleaseDate", y="AvgRating"),
list(plot=scatter_plot, x="ReleaseDate", y="Watches"),list(plot=scatter_plot, x="Watches", y="AvgRating"),
list(plot=histogram, x="ReleaseDate")), ncols = 2))

BTW: ggplotify now supports converting upset to ggplot object, by using as.ggplot:

library(ggplotify) 
p2 <- as.ggplot(
	upset(movies,attribute.plots=list(gridrows=60,plots=list(
		list(plot=scatter_plot, x="ReleaseDate", y="AvgRating"),
		list(plot=scatter_plot, x="ReleaseDate", y="Watches"),
		list(plot=scatter_plot, x="Watches", y="AvgRating"),
		list(plot=histogram, x="ReleaseDate")), ncols = 2))
)

@swuyts

swuyts commented May 25, 2018

Copy link
Copy Markdown

@GuangchuangYu
I just stumbled onto the fact that ggplotify can convert upset to ggplot. Is this also true for a plot without attribute.plots? Currently it throws this error for me:

Error in UseMethod("validGrob") : no applicable method for 'validGrob' applied to an object of class "NULL"

I'd like to use this function to apply the upset plot in a ggarrange call (ggpubr package)

@GuangchuangYu

Copy link
Copy Markdown
Author

ggplotify only works with github version of UpSetR + this PR.

@GuangchuangYu

Copy link
Copy Markdown
Author

image

@GuangchuangYu

Copy link
Copy Markdown
Author

@colinbrislawn

Copy link
Copy Markdown

Any progress towards getting this merged?
It would be great if this was included with 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

Successfully merging this pull request may close these issues.

3 participants