Skip to content

Bugfix guide_axis_theta() label size - #5598

Merged
teunbrand merged 2 commits into
tidyverse:rc/3.5.0from
teunbrand:theta_axis_size
Dec 19, 2023
Merged

teunbrand merged 2 commits into
tidyverse:rc/3.5.0from
teunbrand:theta_axis_size

Conversation

@teunbrand

Copy link
Copy Markdown
Collaborator

This PR aims to fix a bug in GuideAxisTheta extensibility.

Briefly: measuring the grob directly makes more sense than measuring the grob's children when a theta axis is at a class left/right/top/bottom position.

Less briefly: at the time I wrote these lines of code, the labels were a grobTree with individual labels packed into its children. Since then, the label construction has been vectorised in d7e9a2d, and I forgot to adjust the axis measurement code. The problem I ran into is that the code expects that $children is not NULL, whereas they might be. In addition, this brings the guide_axis_theta() behaviour closer to guide_axis() for non-polar coordinates in terms of spacing.

@thomasp85 thomasp85 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@teunbrand
teunbrand merged commit 29ce30a into tidyverse:rc/3.5.0 Dec 19, 2023
@teunbrand
teunbrand deleted the theta_axis_size branch December 19, 2023 10:02
thomasp85 pushed a commit that referenced this pull request Feb 23, 2024
* Measure labels directly

* Accept new snapshot
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

Successfully merging this pull request may close these issues.

2 participants