Professional histogram with smart aesthetic detection.
Usage
ekio_histogram(
data,
x,
fill = NULL,
palette = NULL,
bins = "sturges",
binwidth = NULL,
border_color = "white",
title = NULL,
subtitle = NULL,
caption = NULL,
...
)Arguments
- data
A data frame
- x
Variable to plot (supports data-masking)
- fill
Fill aesthetic. A color string or a discrete variable. NULL uses EKIO blue. A continuous variable is an error: bin it or wrap it in
factor().- palette
Character. Palette name for variable mappings.
- bins
Binning method: "sturges", "FD", "scott", or numeric.
- binwidth
Width of bins (overrides bins if specified)
- border_color
Color for histogram outline (default: "white")
- title, subtitle, caption
Plot labels. NULL (default) draws none.
- ...
Additional arguments passed to
ggplot2::geom_histogram(). These override the recipe's own geom defaults.
Examples
ekio_histogram(mtcars, mpg)
ekio_histogram(mtcars, mpg, fill = "steelblue")
ekio_histogram(mtcars, mpg, fill = factor(cyl), palette = "full")
