Skip to contents

Port of seaborn.displot. Draws histplot (kind = "hist"), kdeplot (kind = "kde"), or ecdfplot (kind = "ecdf") onto a grid of facets. Returns a faceted reaborn_plot.

Usage

displot(
  data = NULL,
  x = NULL,
  y = NULL,
  hue = NULL,
  row = NULL,
  col = NULL,
  weights = NULL,
  kind = "hist",
  rug = FALSE,
  rug_kws = NULL,
  palette = NULL,
  hue_order = NULL,
  hue_norm = NULL,
  color = NULL,
  col_wrap = NULL,
  row_order = NULL,
  col_order = NULL,
  legend = TRUE,
  height = 5,
  aspect = 1,
  facet_kws = NULL,
  ...
)

Arguments

data

A data frame.

x, y

Column name/vector for the histogram variable (use y for a horizontal histogram).

hue

Grouping variable for color.

row, col, col_wrap, row_order, col_order

Faceting controls.

weights

Optional observation weights.

kind

"hist", "kde", or "ecdf".

rug

Add a marginal rug.

rug_kws

Arguments forwarded to the rug layer when rug = TRUE.

palette, hue_order, hue_norm, color

Color controls.

legend

Show the legend.

height, aspect

Facet size controls (stored as attributes).

facet_kws

Reserved for compatibility.

...

Passed to the bar geom.

Value

A reaborn_plot.