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

Polish #6070 #6213

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Polish #6070 #6213

wants to merge 3 commits into from

Conversation

teunbrand
Copy link
Collaborator

This PR fixes #6211.

Briefly, a few mistakes crept into #6070, which this PR rectifies.
The reverse parameter is now passed along in panel parameters so that we can opt-out for guide calculations.

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

p <- ggplot(mpg, aes(displ, hwy)) +
  geom_point() +
  theme(axis.line = element_line())

p + coord_cartesian(reverse = "xy")

For #6211 (comment), note that plot is now correctly centered and 'hwy' title is placed reasonably.

p + coord_radial(
  start = 0.25 * pi, end = 0.75 * pi,
  reverse = "thetar", inner.radius = 0.3
)

Created on 2024-12-04 with reprex v2.1.1

@thomasp85
Copy link
Member

The first plot seems clearly wrong - Or am I missing a reason for the axes to not be flipped as well?

@teunbrand
Copy link
Collaborator Author

Dang it, yes you're right. It must've slipped my attention I'm afraid. I'll put this as a draft until I find a better solution.

@teunbrand teunbrand marked this pull request as draft January 27, 2025 13:08
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.

coord_cartesian(reverse = ...) changes the alignment of the opposite axis line
2 participants