discrete_breaks | R Documentation |
Creates a function that can be passed to scales for creating discrete breaks
at multilples of resolution
.
discrete_breaks(resolution = 1)
resolution |
Resolution of the breaks |
A function that can be passed to scales functions as the breaks
argument.
x <- rbinom(100, 100, 0.4)
p <- gf_bar( ~ x)
p |> gf_refine(scale_x_continuous(breaks = discrete_breaks()))
p |> gf_refine(scale_x_continuous(breaks = discrete_breaks(5)))
p |> gf_refine(scale_x_continuous(breaks = discrete_breaks(2)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.