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

Cant hide legend #17

Open
HugoGit39 opened this issue Apr 18, 2022 · 1 comment
Open

Cant hide legend #17

HugoGit39 opened this issue Apr 18, 2022 · 1 comment

Comments

@HugoGit39
Copy link

Hi first of all great package! However I have an issues with hiding the legend....adding:

plot + theme(legend.title = element_blank()) doesnt seem to work....adding show.legend = F to the aes of ggplot does work but every time I add plot + theme_prism() the legend pops back up

@csdaw
Copy link
Owner

csdaw commented Jun 27, 2022

Thanks!

I'm having a bit of trouble reproducing the issue. Could you post your code/a reproducible example?

library(ggplot2)
library(ggprism)

tg <- ToothGrowth
tg$dose <- as.factor(tg$dose)

ggplot(tg, aes(x = supp, y = len)) + 
  geom_boxplot(aes(fill = supp)) 

ggplot(tg, aes(x = supp, y = len)) + 
  geom_boxplot(aes(fill = supp)) + 
  theme(legend.title = element_blank())

ggplot(tg, aes(x = supp, y = len)) + 
  geom_boxplot(aes(fill = supp)) + 
  theme(legend.title = element_blank()) + 
  theme_prism()

Created on 2022-06-27 by the reprex package (v2.0.1)

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