Skip to content

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
@teunbrand teunbrand mentioned this pull request Mar 27, 2025
@teunbrand
Copy link
Collaborator Author

Closing this in favour of #6381.

@teunbrand teunbrand closed this Mar 27, 2025
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