-
Notifications
You must be signed in to change notification settings - Fork 2k
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
theme_set() breaks theme_void() if axis.text.x or axis.text.y is modified #2058
Comments
I don't really think this is a bug - you need to specify the angle the text should be written in. Usually this is derived from the root text element but since this is |
What is very surprising to me is that I don't make any changes to Moreover, if I nevertheless set
which is why in my continued example I also set Also, I played a little more with this and when I make changes to, e.g., theme_set(theme_classic() + theme(axis.title.x = element_text(angle = 0)))
test <- ggplot(df, aes(gp, y)) + geom_point()
test # works
test + theme_void() # doesn't work
|
I think it is a bug. |
Yeah, I can see that now. I'll look into it |
**Issue** At plot time, the calculation of theme elements always fell back to the default theme. As a consequence, the default theme would leak into complete themes where some of the elements were unspecified. **Solution** Be more specific when calculating the theme defaults. **Clean Up** `theme_void` was insufficiently specified. The solution exposed missing elements that had to be specified. Fixes tidyverse#2058 Fixes tidyverse#2079
**Issue** At plot time, the calculation of theme elements always fell back to the default theme. As a consequence, the default theme would leak into complete themes where some of the elements were unspecified. **Solution** Be more specific when calculating the theme defaults. **Clean Up** `theme_void` was insufficiently specified. The solution exposed missing elements that had to be specified. Fixes tidyverse#2058 Fixes tidyverse#2079
**Issue** At plot time, the calculation of theme elements always fell back to the default theme. As a consequence, the default theme would leak into complete themes where some of the elements were unspecified. **Solution** Be more specific when calculating the theme defaults. **Clean Up** `theme_void` was insufficiently specified. The solution exposed missing elements that had to be specified. Fixes tidyverse#2058 Fixes tidyverse#2079
**Issue** At plot time, the calculation of theme elements always fell back to the default theme. As a consequence, the default theme would leak into complete themes where some of the elements were unspecified. **Solution** Be more specific when calculating the theme defaults. **Clean Up** `theme_void` was insufficiently specified. The solution exposed missing elements that had to be specified. Fixes tidyverse#2058 Fixes tidyverse#2079
I've run into this a couple of times and wind up back on this issue each time. The thing I keep forgetting is that this does not cause an issue if simply |
Hooray for the fix. Thanks! |
Hi, I'm having trouble with one of my custom themes since a recent update (I have tried with version 2.2.1 and the current snapshot from this repository). When I change the settings of
axis.text.x
oraxis.text.y
in a theme that is set as default usingtheme_set()
,theme_void()
throws an error. This causes trouble when I try to usecowplot::plot_grid()
(see my previous bug report).If I set
angle
anddebug
inelement_text()
it works.Is this intended behavior?
The text was updated successfully, but these errors were encountered: