I have imported the image below and I would like to combine with some heatmap and ggplot2 plots .
But got errors while combing the image with other plots
May I get your help please
library(ggplot2)
library(cowplot)
library(magick)
# Update 2020-04-15:
# As of version 1.0.0, cowplot does not change the default ggplot2 theme anymore.
# So, either we add theme_cowplot() when we build the graph
# (commented out in the example below),
# or we set theme_set(theme_cowplot()) at the beginning of our script:
theme_set(theme_cowplot())
my_plot <-
ggplot(data = iris,
mapping = aes(x = Sepal.Length,
fill = Species)) +
geom_density(alpha = 0.7) # +
# theme_cowplot()
img_plt <- ggdraw() + draw_image("https://forum.posit.co/uploads/default/original/3X/0/8/08270ad040b087a935235cc2f36155ab96e01b11.png")
# Example with PNG (for fun, the OP's avatar - I love the raccoon)
plot_grid(my_plot,
img_plt,
my_plot,
ncol = 3)