set_default_plots: Set a default plot spec on an 'xp_xtras' object

View source: R/xtra_plot_all.R

set_default_plotsR Documentation

Set a default plot spec on an xp_xtras object

Description

Stores a plot spec on xpdb that plot.xpose_data() uses instead of the package's built-in default whenever plots isn't supplied directly to that call. Unlike set_default_labs()/set_default_watermark(), this replaces the xpdb-level default wholesale rather than merging with it: entries in a plot spec aren't addressable by a stable key (the same plot function can legitimately appear more than once), so there is no sensible key-by-key merge to perform.

Usage

set_default_plots(xpdb, plots)

Arguments

xpdb

<xpose_data> or <xp_xtras> object

plots

A list of plot specs – see plot.xpose_data() for the accepted forms

Value

xp_xtras object

See Also

set_xtras_options() for the session-option equivalent (xpose.xtras.default_plots), and get_xtras_option() to check which one is currently dominant.

Examples

xpdb2 <- set_default_plots(xpdb_x, list(~ xpose::dv_vs_ipred(.x), ~ xpose::eta_distrib(.x)))
names(plot(xpdb2, quiet = TRUE))

xpose.xtras documentation built on Sept. 1, 2026, 5:08 p.m.