Skip to content
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

Fix coord_radial() full circle bug #5752

Merged
merged 4 commits into from
Mar 18, 2024

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #5750.

Briefly, the piece that checks whether the (start, end) interval contained horizontal or vertical thetas sometimes normalised a full circle to have 0 interval. Full circles are special-cased now to always include any theta.

Reprex from issue:

devtools::load_all("~/packages/ggplot2")
#> ℹ Loading ggplot2
library(palmerpenguins)

penguins |>
  ggplot() +
  geom_point(
    aes(x = flipper_length_mm, 
        y = body_mass_g,
        col = species)) +
  theme_classic() +
  coord_radial(start = 90)
#> Warning: Removed 2 rows containing missing values or values outside the scale range
#> (`geom_point()`).

Created on 2024-03-06 with reprex v2.1.0

@teunbrand teunbrand added this to the ggplot2 3.5.1 milestone Mar 6, 2024
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 ce6eed8 into tidyverse:main Mar 18, 2024
12 checks passed
@teunbrand teunbrand deleted the coord_radial_range_bug branch March 18, 2024 10:06
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.

When start is specified, r_axis_inside sometimes defaults to TRUE, despite it being a full circle
2 participants