Background Images to the charts/plots created using ggplot/ggplot2 in R Server


Need help in adding background image to the Charts/Plots created using ggplot in R Server to display in R Shiny.

Check out the ggbackground() function in ggimage:

Below is before I found ggbackground
You might take a look at the ggpomological package as an example to work from, since it uses a background image for the plot.

You wouldn't actually use ggpomological, you'd likely use the packages it uses (e.g. magick), but it's nice to see someone else's approach.

There's another approach described in this post, though I haven't worked with the packages it uses personally;


For the sake of completeness, cowplot can also layer images into ggplot2 plots. See the example at the end of this vignette:

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.