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

margins change when adding element_marquee to plot titles #27

Closed
davidhodge931 opened this issue Jun 5, 2024 · 2 comments
Closed

margins change when adding element_marquee to plot titles #27

davidhodge931 opened this issue Jun 5, 2024 · 2 comments

Comments

@davidhodge931
Copy link

library(tidyverse)
library(palmerpenguins)
library(marquee)

p1 <- penguins |>
  ggplot() +
  geom_histogram(aes(x = bill_depth_mm)) +
  labs(
    title = "Pygoscelis penguin bill depths",
    subtitle = "Adelie, Chinstrap, and Gentoo species",
  ) 

p2 <- p1 + 
  theme(plot.title = marquee::element_marquee()) +
  theme(plot.subtitle = marquee::element_marquee())

p1

p2
image image
@thomasp85
Copy link
Member

I think this is fixed in dev. I did some tweaks to the margin collapsing based on similar feedback

@davidhodge931
Copy link
Author

davidhodge931 commented Jun 6, 2024

Thanks! Dev version margins look really good :)

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

2 participants