UpSetR icon indicating copy to clipboard operation
UpSetR copied to clipboard

set unique arrange id for each panel

Open GuangchuangYu opened this issue 6 years ago • 5 comments

this PR solve the issue on https://github.com/hms-dbmi/UpSetR/issues/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))
)

GuangchuangYu avatar Apr 24 '18 06:04 GuangchuangYu

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

swuyts avatar May 25 '18 09:05 swuyts

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

GuangchuangYu avatar May 27 '18 14:05 GuangchuangYu

image

GuangchuangYu avatar May 27 '18 14:05 GuangchuangYu

Any progress towards getting this merged? It would be great if this was included with UpSetR!

colinbrislawn avatar Mar 29 '21 19:03 colinbrislawn