Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims to fix tidyverse/ggplot2#6317.
Briefly, the
default_aes
fields have changed to more often include expressions that are to be evaluated instead of fixed values. This causes a problem for thematic in extracting these defaults, as thematic expects the fixed values.This PR uses ggplot2's new getter to resolve this information, which makes thematic compatible again with the impending ggplot2 version.
In addition, I've seen some visual changes that appear to be due to a miscalculation of the
axis.ticks.length
family of theme settings. I haven't familiarised myself too much with how thematic derives these, but it might be worth reviewing at some point.As an aside, ggplot2 has revamped how defaults are determined, which are now mostly determined via the theme. Partially this overlaps with thematic goals, so I think there might be an opportunity to leverage ggplot2's new theme settings to reduce the effort thematic has to do.
We plan to release the new ggplot2 version in May 2025, so I'd be great if we didn't break thematic at that point.