Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ggbackground overrides annotation_custom #51

Open
SeriyBg opened this issue Dec 5, 2023 · 0 comments
Open

ggbackground overrides annotation_custom #51

SeriyBg opened this issue Dec 5, 2023 · 0 comments

Comments

@SeriyBg
Copy link

SeriyBg commented Dec 5, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant