np.plot.controls: Validated plot control helpers

np_plot_controlsR Documentation

Validated plot control helpers

Description

Constructors for detailed plot controls used by the redesigned np plotting interface. Common choices such as errors, band, alpha, bootstrap, and B remain direct plot arguments; these helpers collect less common options.

Usage

np_boot_control(nonfixed = c("exact", "frozen"),
                wild = c("rademacher", "mammen"),
                blocklen = NULL)

np_grid_control(xtrim = NULL, xq = NULL, slices = NULL)

np_render_control(style = c("band", "bar"),
                  bar = c("|", "I"),
                  bar_num = NULL)

Arguments

nonfixed

Bootstrap refit behavior for non-fixed bandwidth routes.

wild

Wild-bootstrap multiplier distribution.

blocklen

Optional block length for block bootstrap methods.

xtrim

Optional two-element trim range for evaluation grids.

xq

Optional evaluation quantiles.

slices

Optional slice specification for routes that support it.

style

Interval display style.

bar

Bar style when style = "bar".

bar_num

Optional number of bars.

Details

These helpers validate names and values early. Raw lists are deliberately not accepted as substitutes, so misspelled detailed controls fail before plot computation begins.

New public plot arguments use snake_case. Dotted argument names are reserved for S3 methods and internal plot-engine plumbing. Common rendering controls such as data_overlay, data_rug, layout, and output are supplied directly to plot(...) rather than through np_render_control().

Value

A small classed list consumed by plot methods.

Examples

## Not run: 
plot(fit,
     errors = "bootstrap",
     bootstrap = "inid",
     B = 1999,
     band = "pointwise",
     boot_control = np_boot_control(nonfixed = "exact"))

## End(Not run)

np documentation built on May 16, 2026, 1:07 a.m.