Skip to content

implement scale_x/y_chemunits(..., auto_scale = FALSE/TRUE) to allow for auto_scaling on axis labels? #3

@sebkopf

Description

@sebkopf
df <- 
  crossing(
    conc = set_cu(c(0.5, 25), "mM"),
    volume = set_cu(c(0.2, 90, 400), "mL")
  ) |> 
  mutate(amount = conc * volume)

df |>
  mutate(conc = fct_inorder(format(conc))) |> 
  ggplot() +
  aes(x = volume, y = amount, color = conc) +
  geom_line() +
  facet_wrap(~conc, scales = "free") +
  scale_x_units(transform = "log10", auto_scale = TRUE) +
  scale_y_units(transform = "log10", auto_scale = TRUE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions