pm_opts.Rd
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, axis.title.short = FALSE, time.unit = "hr" ) pm_opts pm
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 | |
abline.lwd | |
abline.col | |
abline.lty | |
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 horizantal 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 |
axis.title.short | shorten standard axis titles |
time.unit | default time unit |
An object of class pm_opts
(inherits from environment
) of length 36.
An object of class pm_opts
(inherits from environment
) of length 36.
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
.
pm$set(smooth.lwd = 2) pm$smooth.lwd#> [1] 2pm$smooth.lwd <- 1.3 pm$smooth.lwd#> [1] 1.3#> [1] 1.3pm$reset() x <- pm$as.list() if (FALSE) { defs <- pm$defaults defs$smooth.col <- "firebrick" pm$set(.list = defs) }