I really like how balloonplot generates the balloon plots with the grid, moreover it keeps the cells with value of zero but does not show the circle. Here is an example,
dt <- as.table(as.matrix(mtcars[1:10,]))
balloonplot(t(dt), xlab ="", ylab="", label = FALSE, show.margins = FALSE, cum.margins=F)
When I tried to generate this in ggplot is a mess, because I can't get the grid to show up correctly and moreover the cells with zero are showing up as dot and not blank.
ggplot(melt(dt), aes(x =X2, y = X1)) +geom_point( aes(size=value),shape=21, colour="black", fill="skyblue")
Is there a way to plot this with ggplot OR alternatively save the gplot as a ggplot object? The reason why I'm I need a ggplot object is because I plan to sticth this as a bigger overall figure with pathwork.
# this fails
as.ggplot(balloonplot(t(dt), xlab ="", ylab="", label = FALSE, show.margins = FALSE))
thanks!
The closest I could get was the ggpubr balloon plot - does this suit your needs?