GuangchuangYu / ggplotify

ggplot everything
https://cran.r-project.org/package=ggplotify/vignettes/ggplotify.html
103 stars 11 forks source link

LargeheatmapList with as.ggplot() #16

Open jaakoobb opened 1 month ago

jaakoobb commented 1 month ago

Hi,

I'm trying to convert a clustered Dotplot, which I created with the Clustered_DotPlot() function from the scCustomize library, into a ggplot object. However, when I try to run

as.ggplot(p1)

I get the error:

Error in UseMethod("as.grob") : no applicable method for 'as.grob' applied to an object of class "c('HeatmapList', 'AdditiveUnit')"

Am I doing something wrong or is there a good way of doing this?

Many thanks Jakob

GuangchuangYu commented 1 month ago

not compatible.

jaakoobb commented 1 month ago

Alright, that's too bad. And there is now way to do that manually?

jaakoobb commented 1 month ago

Im just asking, because in the package documentation it says: With this package, we are able to e.g. using 'cowplot' to align plots produced by 'base' graphics, 'ComplexHeatmap', 'eulerr', 'grid', 'lattice', 'magick', 'pheatmap', 'vcd' etc. by converting them to 'ggplot' objects.

So I thought, a heatmap created with the ComplexHeatmap package may also be compatible with ggplotify.