ggimage icon indicating copy to clipboard operation
ggimage copied to clipboard

ggbackground overrides annotation_custom

Open SeriyBg opened this issue 2 years ago • 0 comments

I want to use annotation_custom to add the logo to the plot. However, when I'm using it together with the ggbackground, the background image seems to cover the logos:

plot <- ggbackground(plot, "background.png")
plot + 
  annotation_custom(rasterGrob(logo), xmin = 0, xmax = 0.3, ymin = 0.3, ymax = -1) +
  coord_cartesian(clip = "off")

The same code without ggbackground(plot, "background.png") generates the expected result.

SeriyBg avatar Dec 05 '23 12:12 SeriyBg