talgalili / gplots

13 stars 6 forks source link

balloonplot #5

Open ggrothendieck opened 3 years ago

ggrothendieck commented 3 years ago

balloonplot does not work with grid.echo even though other classic graphics plots do. There was once a similar error in ggplot2 discussed here: https://github.com/tidyverse/ggplot2/issues/3483

library(cowplot)
library(gplots)
library(grid)
library(gridGraphics)

# works
tab <- table(mtcars[1:10, 1:2])
heatmap(tab)
grid.echo()
p1 <- grid.grab()
plot_grid(p1)

# gives error
library(gplots)
balloonplot(tab)
p2 <- grid.echo()
## Error in checkNA("cex") : 
##  mixture of missing and non-missing values for cex

plot_grid(p2)