Set global plot options

pm_options(
  smooth.lwd = 1.35,
  smooth.col = .ggblue,
  smooth.lty = 2,
  smooth.method = "loess",
  scatter.size = 1.5,
  scatter.col = "black",
  density.lwd = 1.35,
  density.col = .ggblue,
  density.lty = 2,
  hline.lwd = 1.35,
  hline.col = "darkgrey",
  hline.lty = 1,
  abline.lwd = 1.35,
  abline.col = "darkgrey",
  abline.lty = 1,
  histogram.fill = "black",
  histogram.alpha = 0.6,
  histogram.col = "white",
  boxplot.fill = "white",
  boxplot.alpha = 1,
  boxplot.hline.lwd = 1,
  boxplot.hline.lty = 2,
  boxplot.hline.col = "black",
  boxplot.outlier.shape = 19,
  qq.col = .ggblue,
  qq.alpha = 1,
  qq.size = 1.35,
  pairs.cor.size = 3,
  pairs.cor.prefix = "corr\n",
  pairs.cor.col = .ggblue,
  pairs.cor.fontface = "bold",
  pairs.cor.digits = 2,
  pairs.cor.shown = TRUE,
  axis.title.short = FALSE,
  time.unit = "hr"
)

pm_opts

pm

Arguments

smooth.lwd

line width for smoother

smooth.col

line color for smoother

smooth.lty

line type for smoother

smooth.method

method to use for creating smoother

scatter.size

point size for scatter plot

scatter.col

character name of color for scatter plot

density.lwd

line width for density plot on histogram

density.col

line color for density plot on histogram

density.lty

line type for density plot on histogram

hline.lwd

line width for horizontal reference line; see layer_h and gh

hline.col

line color for horizontal reference line; see layer_h and gh

hline.lty

line type for horizontal reference line; see layer_h and gh

abline.lwd

line width for diagonal reference line; see layer_a and ga

abline.col

line color for diagonal reference line; see layer_a and ga

abline.lty

line type for diagonal reference line; see layer_a and ga

histogram.fill

fill color for histograms

histogram.alpha

alpha value for histograms

histogram.col

line color for histograms

boxplot.fill

fill color for histograms

boxplot.alpha

alpha value for boxplots

boxplot.hline.lwd

line width for horizontal reference line

boxplot.hline.lty

line type for horizontal reference line

boxplot.hline.col

line color for horizontal reference line

boxplot.outlier.shape

shape for outliers in boxplots

qq.col

point color for qq plots

qq.alpha

alpha value for qq plots

qq.size

point size for qq plots

pairs.cor.size

font size for correlation text in upper panels of pairs plots

pairs.cor.prefix

prefix for correlation text in upper panels of pairs plots

pairs.cor.col

color for correlation text in upper panels of pairs plots

pairs.cor.fontface

font face for correlation text in upper panels of pairs plots

pairs.cor.digits

number of digits to show when reporting correlation in upper panels of pairs plots

pairs.cor.shown

if TRUE, then report the number of non-missing observations used to calculate correlation in upper panels of pairs plots

axis.title.short

shorten standard axis titles

time.unit

default time unit

Format

An object of class pm_opts (inherits from environment) of length 42.

An object of class pm_opts (inherits from environment) of length 42.

Details

pm and pm_opts both refer to the same environment.

Global options can be set in the environment with pm$set(name = value). There is also a .list argument to pm$set that allows you to pass in a named list of options to set (e.g. pm$set(.list = list(smooth.col="red4"))).

Values can be extracted with pm$get("name").

Because it is an environment, the $ operator can also be used to get and set values (see examples).

Other methods in the environment include pm$as.list(), pm$mget(), pm$reset(). pm$self refers to the environment itself. A list of default settings can be obtained with pm$defaults. Methods for the pm_opts object include: print.pm_opts, as.list.pm_opts, $<-.pm_opts.

Examples

pm$set(smooth.lwd = 2) pm$smooth.lwd
#> [1] 2
pm$smooth.lwd <- 1.3 pm$smooth.lwd
#> [1] 1.3
pm$get("smooth.lwd")
#> [1] 1.3
pm$reset() x <- pm$as.list() if (FALSE) { defs <- pm$defaults defs$smooth.col <- "firebrick" pm$set(.list = defs) }