Skip to content

Bugfix guide_axis_theta() label size #5598

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

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

teunbrand
Copy link
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.

Copy link
Member

@thomasp85 thomasp85 left a comment

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