Skip to content

wrong r_axis_inside used in coord_radial #6411

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

Open
Yunuuuu opened this issue Apr 9, 2025 · 0 comments · May be fixed by #6412
Open

wrong r_axis_inside used in coord_radial #6411

Yunuuuu opened this issue Apr 9, 2025 · 0 comments · May be fixed by #6412

Comments

@Yunuuuu
Copy link
Contributor

Yunuuuu commented Apr 9, 2025

The CoordRadial class modifies the r_axis_inside parameter within its $setup_params() method. However, almost all other methods continue to access self$r_axis_inside directly,

params$r_axis_inside <- TRUE

This causes following warning message:

options(warnPartialMatchDollar = TRUE)
library(ggplot2)
# I won't draw anything, please see the warning message
p <- ggplot(mtcars, aes(disp, mpg)) +
  geom_point() +
  coord_radial(start = 0.1 * pi, end = 0.4 * pi, r.axis.inside = FALSE)
pdf()
print(p)
#> Warning: No appropriate placement found for `r_axis_inside`.
#> ℹ Axis will be placed at panel edge.
#> Warning in params$r_axis: partial match of 'r_axis' to 'r_axis_inside'
#> Warning in params$r_axis: partial match of 'r_axis' to 'r_axis_inside'
dev.off()
#> png 
#>   2

Created on 2025-04-09 with reprex v2.1.0

Although this example only produces warning messages, the underlying logic may result in incorrect axis placement or other unexpected plotting behavior due to improper parameter access.

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 a pull request may close this issue.

1 participant