Skip to content

minor_breaks_n uses the limits instead of major breaks #500

@JohnADawson

Description

@JohnADawson

Minor breaks ought to be evenly spaced, but in the following example they are not, because 10 minor breaks are put between 0 and the left limit, instead of the previous major break, -5, and, similarly, 10 minor breaks are put between 20 and the right limit, instead of the next major break, 25.

tibble::tibble(x = c(0., 20.)) |>
  ggplot2::ggplot(ggplot2::aes(.data$x)) +
  ggplot2::scale_x_continuous(minor_breaks = scales::minor_breaks_n(10L))

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions