-
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
Various fixes to themes #1679
Various fixes to themes #1679
Conversation
Does this connect to #1581 in any way? I never really use themes, so I'd also be open to suggestions about how to decrease the likelihood of regressions when I merge future PRs. |
I don't think it relates to #1581 in any way. I think the point of that PR is well made. Once it is merged, it would (marginally) simplify some of the theme specifications but it should not create any regression. As for regressions for the changes in this PR, it depends what you would call a regression. Some commits here do change the visual aspect. I think for the better but some might say any change is a regression at this point. You have the before-after shots to judge which are acceptable. I think the most problematic, potentially, would be PS: The merge tool says there are conflicts but I just branched from master a few days ago. I've changed the commits to solve a Travis error; do do so I've had to force push the new commits. Maybe this throws the merge tool astray. Let me know if you want to rebase. |
Ok, sounds reasonable. If you rebase, I'll merge. |
Set in theme_grey to 11
Keep contrast and size of gridlines (in particular, previously the minor grid lines were thicker than the major ones which looked weird) Remove the border around the legend key which complicates things visually for little gain Outline panel and facet strips with a dark-ish grey
Use strip.text instead and strip.text.x and strip.text.y separately Slightly thicker grid lines compared to the previous iteration (but still quite thin) Base on theme_bw rather than on theme_grey
Use strip.text instead and strip.text.x and strip.text.y separately As in theme_grey and theme_bw, keep the same color for major and minor gridlines; just change the thickness (as was already done before). In theme_dark, make the strips the inverse of what they are in theme_grey
Just to match theme_grey. No visual change beyond the changes to theme_bw on which this is based
Explicitly add axes which disappeared due to new specifications in theme_bw at some point. Increase size of the borders of strips to match axes visually.
(otherwise the plot may be un-understandable)
They are related and their examples are in this order
I've rebased. I'm not sure what that failing check means... |
Thanks! The failing check is just for unit tests, which don't matter here |
That was quick, thanks. Do you want me to test how #1728 behaves after this merge? |
I'll update that branch, but I think it should be largely independent. |
* Match default font size to new default Set in theme_grey to 11 * Match theme_bw with theme_grey better Keep contrast and size of gridlines (in particular, previously the minor grid lines were thicker than the major ones which looked weird) Remove the border around the legend key which complicates things visually for little gain Outline panel and facet strips with a dark-ish grey * Simplify theme_linedraw Use strip.text instead and strip.text.x and strip.text.y separately Slightly thicker grid lines compared to the previous iteration (but still quite thin) Base on theme_bw rather than on theme_grey * Improve and homogenise theme_dark and theme_light Use strip.text instead and strip.text.x and strip.text.y separately As in theme_grey and theme_bw, keep the same color for major and minor gridlines; just change the thickness (as was already done before). In theme_dark, make the strips the inverse of what they are in theme_grey * Reorder elements in the specification of theme_minimal Just to match theme_grey. No visual change beyond the changes to theme_bw on which this is based * Fix regressions in theme_classic Explicitly add axes which disappeared due to new specifications in theme_bw at some point. Increase size of the borders of strips to match axes visually. * Keep legend title in theme_void (otherwise the plot may be un-understandable) * Improve comments and reorder elements to match other theme specification * Fix alignment of code in all theme functions * Add NEWs bullet for theme update * Move theme_dark next to theme_light in the code They are related and their examples are in this order
Is there a convenient way to access the old definitions? I need to retrofit a |
You can probably pull the file with the definitions from 2.1.0 and override the new ones by sourcing just this file... unless this was before the theming system changed. |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
Make both the code and the visual aspect of all theme more homogeneous. The general idea was to take theme_grey as the reference for all changes (and since it changed slightly in the previous update of ggplot2, the other themes needed some love too!).
I tried to divide the PR in small standalone commits (too lazy for several pull requests ;-) ). I'll update them as needed so that the show PR can be merged. I also added the rationale for various choices as comments in the code.
Some fixes were clearly needed (default size, etc.). Visually, I think theme_bw in particular needed a review. For the others, the changes are quite subtle.