Skip to content

Could scale_*_continuous & scale_*_binned use labels defaults from scales::number_options? #6850

@davidhodge931

Description

@davidhodge931

Desired behaviour is for the plot below to take on the number_options defaults set, and have a comma seperator in this case - thanks for considering!

library(tidyverse)
#> Warning: package 'purrr' was built under R version 4.5.3
#> Warning: package 'dplyr' was built under R version 4.5.3

scales::number_options(big.mark = ",")

ggplot2::mpg |>
  dplyr::mutate(drv = dplyr::case_when(
    drv == "4" ~ "4-wheel",
    drv == "f" ~ "Front",
    drv == "r" ~ "Rear",
  )
  ) |>
  mutate(hwy = hwy * 100) |> 
  mutate(displ = displ * 1000) |> 
  ggplot(aes(x = displ, y = hwy, fill = drv, colour = drv)) +
  geom_point() +
  scale_x_continuous() +
  scale_y_continuous()

Created on 2026-04-16 with reprex v2.1.1

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