density_plot {ezplot} | R Documentation |
density_plot
Description
creates a density plot
Usage
density_plot(
data,
x,
group = NULL,
facet_x = NULL,
facet_y = NULL,
palette = ez_col,
adjust = 1,
alpha = 0.5,
facet_scales = "fixed",
facet_ncol = NULL,
legend_ncol = NULL,
env = parent.frame()
)
Arguments
data |
A data.frame. |
x |
A named character value. Evaluates to a column. |
group |
A character value. Evaluates to a column. |
facet_x |
A character value. Evaluates to a column. |
facet_y |
A character. Evaluates to a column. |
palette |
Colour function. |
adjust |
multiplicate bandwidth adjustment |
alpha |
alpha |
facet_scales |
Option passed to scales argument in |
facet_ncol |
Option passed to ncol argument in |
legend_ncol |
Number of columns in legend. |
env |
environment for evaluating expressions. |
Examples
library(tsibbledata)
density_plot(mtcars, "wt", "cyl")
density_plot(subset(tsibbledata::olympic_running, Length == 100 & Year >= 1980),
"Time", "Year - Year %% 10", "Sex", facet_scales = "free", facet_ncol = 1, adjust = 2)
[Package ezplot version 0.7.13 Index]