scatter_panel: Panel Function for Metaplot Scatterplot

View source: R/scatter.R

scatter_panelR Documentation

Panel Function for Metaplot Scatterplot

Description

Default panel function for scatter_data_frame. Calls panel.xyplot and optionally plots linear fit, confidence region, reference lines, and statistics. Note that, although global options are supported, typically these are unreachable since the calling function supplies appropriate values.

Usage

scatter_panel(
  x,
  y,
  groups,
  xref = metOption("xref_scatter_panel", scatter_panel_ref),
  yref = metOption("yref_scatter_panel", scatter_panel_ref),
  ref.col = metOption("ref.col_scatter_panel", "grey"),
  ref.lty = metOption("ref.lty_scatter_panel", "solid"),
  ref.lwd = metOption("ref.lwd_scatter_panel", 1),
  ref.alpha = metOption("ref.alpha_scatter_panel", 1),
  xref.col = metOption("xref.col_scatter_panel", NULL),
  xref.lty = metOption("xref.lty_scatter_panel", NULL),
  xref.lwd = metOption("xref_lwd_scatter_panel", NULL),
  xref.alpha = metOption("xref_alpha_scatter_panel", NULL),
  yref.col = metOption("yref_col_scatter_panel", NULL),
  yref.lty = metOption("yref_lty_scatter_panel", NULL),
  yref.lwd = metOption("yref_lwd_scatter_panel", NULL),
  yref.alpha = metOption("yref_alpha_scatter_panel", NULL),
  ysmooth = metOption("ysmooth_scatter_panel", FALSE),
  xsmooth = metOption("xsmooth_scatter_panel", FALSE),
  smooth.lty = metOption("smooth.lty_scatter_panel", "dashed"),
  smooth.lwd = metOption("smooth.lwd_scatter_panel", 1),
  smooth.alpha = metOption("smooth.alpha_scatter_panel", 1),
  fit = metOption("fit_scatter_panel", NULL),
  fit.lty = metOption("fit.lty_scatter_panel", "solid"),
  fit.lwd = metOption("fit.lwd_scatter_panel", 1),
  fit.alpha = metOption("fit.alpha_scatter_panel", 1),
  conf = metOption("conf_scatter_panel", FALSE),
  conf.alpha = metOption("conf.alpha_scatter_panel", 0.3),
  loc = metOption("loc_scatter_panel", 0),
  iso = metOption("iso_scatter_panel", FALSE),
  global = metOption("global_scatter_panel", FALSE),
  global.col = metOption("global.col_scatter_panel", "grey"),
  global.fill = metOption("global.fill_scatter_panel", "grey"),
  msg = metOption("msg_scatter_panel", "metastats"),
  type,
  verbose = metOption("verbose_scatter_panel", FALSE),
  ...
)

Arguments

x

x values

y

y values

groups

optional grouping item

xref

reference line from x axis; can be function(x, y, ...)

yref

reference line from y axis; can be function(y, x, ...)

ref.col

default shared by xref.col and yref.col

ref.lty

default shared by xref.lty and yref.lty

ref.lwd

default shared by xref.lwd and yref.lwd

ref.alpha

default shared by xref.alpha and yref.alpha

xref.col

x reference line color (recycled)

xref.lty

x reference line type (recycled)

xref.lwd

x reference line size (recycled)

xref.alpha

x reference line alpha (recycled)

yref.col

y reference line color (recycled)

yref.lty

y reference line type (recycled)

yref.lwd

y reference line size (recycled)

yref.alpha

y reference line alpha (recycled)

ysmooth

supply loess smooth of y on x

xsmooth

supply loess smmoth of x on y

smooth.lty

smooth line type

smooth.lwd

smooth line size

smooth.alpha

smooth alpha

fit

draw a linear fit of y ~ x; defaults to as.logical(conf)

fit.lty

fit line type

fit.lwd

fit line size

fit.alpha

fit alpha

conf

logical, or width for a confidence region around a linear fit; passed to region; TRUE defaults to 95 percent confidence interval; may not make sense if xlog is TRUE

conf.alpha

alpha transparency for confidence region

loc

where to print statistics on a panel; suppressed for grouped plots

iso

logical: use isometric axes with line of unity (auto-selected if NA); can be a (partial) list of aesthetics (col, lty, lwd, alpha)

global

if TRUE, xsmooth, ysmooth, fit, and conf are applied to all data rather than groupwise

global.col

color for global aesthetics

global.fill

fill color for global aesthetics

msg

a function to print text on a panel: called with x values, y values, and ....

type

overridden by scatter_panel

verbose

generate messages describing process

...

passed to panel.superpose, panel.xyplot, panel.polygon, region, panel.text

See Also

metastats

scatter.data.frame

Other panel functions: boxplot_panel(), categorical_panel(), corsplom_gg_correlation(), corsplom_gg_diagonal(), corsplom_gg_scatter(), corsplom_panel_correlation(), corsplom_panel_diagonal(), corsplom_panel_scatter(), dens_panel(), diag_label(), diag_pin(), iso_prepanel(), metaplot_key(), metaplot_ref(), panel.meta_densityplot(), panel_tile(), scatter_panel_ref()

Other scatter: metaplot_key(), scatter.data.frame(), scatter_data_frame(), scatter()


bergsmat/metaplot documentation built on Feb. 21, 2024, 1:18 p.m.