library(ggplot2)
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
library(palmerpenguins)
library(ggblanket)
set_blanket()
x1 <- 2000
x2 <- 9000
n <- 6
penguins |>
gg_point(
x = flipper_length_mm,
y = body_mass_g,
col = sex,
y_limits = range(seq(from = x1, to = x2, by = (x2 - x1) / (n - 1))),
y_breaks = seq(from = x1, to = x2, by = (x2 - x1) / (n - 1)),
y_expand = c(0, 0),
)
#> y 'symmetric' scale cannot be constructed unless `y_limits = NULL` & `y_expand
#> = NULL`
#> Scale for y is already present.
#> Adding another scale for y, which will replace the existing scale.
#> Warning: Removed 2 rows containing missing values or values outside the scale range
#> (`geom_point()`).
Should do this....
Created on 2024-06-18 with reprex v2.1.0