Skip to content

🐛 Deal with empty radial axes #6272

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 9 commits into from
Jan 28, 2025

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #6271.

The trouble was twofold:

  • guide_axis_theta() didn't know how to deal with empty parameters.
  • coord_radial() accidentally deleted empty guides, instead of keeping them around as NULL parameters.

This PR fixes these.

@teunbrand teunbrand changed the title 🩹 Deal with empty radial axes 🐛 Deal with empty radial axes Jan 7, 2025
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

if (position == "inside") {
adjust <- theme(
legend.position.inside = groups$key$coord[[i]],
legend.position.inside = groups$key$coords[[i]],
Copy link
Member

Choose a reason for hiding this comment

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

Did you by change go through the code to check if there were more of these partial matches?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll add it to my todo list

@teunbrand teunbrand merged commit 09776db into tidyverse:main Jan 28, 2025
13 checks passed
@teunbrand teunbrand deleted the empty_coord_radial_axes branch January 28, 2025 11:44
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.

Error when setting breaks in coord_radial()
2 participants