Skip to content

coord_cartesian(reverse = ...) changes the alignment of the opposite axis line #6211

Closed
@davidhodge931

Description

@davidhodge931
library(tidyverse)
library(palmerpenguins)

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

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

penguins |> 
  ggplot() +
  geom_point(aes(x = flipper_length_mm, y = body_mass_g)) +
  theme_classic() +
  coord_cartesian(reverse = "xy")
#> Warning: Removed 2 rows containing missing values or values outside the scale range
#> (`geom_point()`).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions