Learn R Programming

SPARRAfairness (version 0.1.0.0)

groupmetric_2panel: groupmetric_2panel Draws plots of a group fairness metric with a second panel underneath

Description

groupmetric_2panel Draws plots of a group fairness metric with a second panel underneath

Usage

groupmetric_2panel(
  objs,
  labels = names(objs),
  col = 1:length(objs),
  yrange = NULL,
  ci_col = col,
  highlight = NULL,
  logscale = FALSE,
  lpos = c(1, 0),
  yrange_lower = NULL,
  legend_title = ""
)

Value

Silently return ggplot object

Arguments

objs

list of fairness objects. Each should contain sub-objects 'x', 'y' and 'ci', which specify x and y values and half-widths of confidence intervals around y.

labels

labels to use in legend

col

line colours

yrange

limit of y axis; defaults to 0,1

ci_col

confidence envelope colours. These will be transparent.

highlight

if non-null, draw a point at a particular cutoff

logscale

if TRUE, draw with log-scale.

lpos

legend position; as accepted by ggplot legend.position

yrange_lower

y range for lower plot. If NULL, generates automatically

legend_title

title for legend, defaults to nothing

Examples

Run this code
# See vignette

Run the code above in your browser using DataLab