add_histogram | R Documentation |
Add histogram
add_histogram(plot, binwidth = NULL, bins = NULL, ...)
plot |
A |
binwidth |
The width of the bins. Can be specified as a numeric value
or as a function that takes x after scale transformation as input and
returns a single numeric value. When specifying a function along with a
grouping structure, the function will be called once per group.
The default is to use the number of bins in The bin width of a date variable is the number of days in each time; the bin width of a time variable is the number of seconds. |
bins |
Number of bins. Overridden by |
... |
Arguments passed on to the |
A tidyplot
object.
energy |>
tidyplot(x = energy) |>
add_histogram()
energy |>
tidyplot(x = energy, color = energy_type) |>
add_histogram()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.