draw_quantile_elli: Draw data quantile ellipses.

View source: R/functions_special_plots.R

draw_quantile_elliR Documentation

Draw data quantile ellipses.

Description

Draws median (diamond) and user-specified data quantiles (ellipse).

Usage

draw_quantile_elli(
  data,
  variables,
  split_factor = NULL,
  quantiles = c(0.25, 0.75),
  non_zero = FALSE,
  ell_width = 0.5,
  alpha = 0.5,
  fill = "cornsilk4",
  median_color = "coral3",
  plot_title = NULL,
  plot_subtitle = NULL,
  plot_tag = NULL,
  x_lab = "median with IQR",
  cust_theme = ggplot2::theme_classic(),
  ...
)

Arguments

data

a data frame.

variables

names of the variables to plot.

split_factor

name of the splitting variable.

quantiles

quantiles to be shown on the longer axis (a dimension) of ellipses, a two element vector.

non_zero

logical, should the zero values be removed?

ell_width

length of the shorter ellipse axis (b dimension).

alpha

alpha of the ellipses.

fill

fill color of the ellipses, ignored when split_factor is provided.

median_color

color of the median points, ignored when split factor provided.

plot_title

plot title.

plot_subtitle

plot subtitle.

plot_tag

plot tag.

x_lab

x axis title.

cust_theme

custom ggplot theme.

...

extra arguments passed to stat_ellip.

Details

employs stat_ellip.

Value

a ggplot object.


PiotrTymoszuk/ExDA documentation built on Nov. 17, 2024, 5:46 p.m.