vc_plot_area: Display geometric area between sampled graphs

View source: R/plot_applications.R

vc_plot_areaR Documentation

Display geometric area between sampled graphs

Description

Display geometric area between sampled graphs

Usage

vc_plot_area(
  result,
  f,
  g = NULL,
  n = 401L,
  colors = c(f = "#24476b", g = "#c44736", region = "#188367"),
  alpha = 0.35,
  line_width = 2,
  line_dash = c("solid", "dash", "dot", "dashdot"),
  title = NULL,
  xlab = "x",
  ylab = "y",
  xlim = NULL,
  ylim = NULL
)

Arguments

result

Result from vc_area().

f, g

The same scalar boundary functions used in calculation; NULL g means zero. Functions are sampled, but quadrature is not recomputed.

n

Integer curve sample count, at least two. Known stored breaks are also sampled to show supplied crossings.

colors

Named f, g and region Plotly/CSS colors.

alpha

Finite fill opacity between zero and one.

line_width

Positive finite curve width.

line_dash

Curve line style: solid, dash, dot or dashdot.

title

Optional scalar title; default reports stored geometric and signed estimates and the area tolerance diagnostic.

xlab, ylab

Scalar axis labels.

xlim, ylim

Optional finite increasing display ranges; NULL uses data.

Details

Crossings between samples can be missed. Invalid samples are gaps; neither quadrature nor rendering proves all features were resolved. Axes are linear to retain geometric meaning. Match f/g to the stored analysis.

Value

Plotly widget shading the sampled lower/upper envelopes, with both original graphs. Fill is a geometric region, not a new area calculation.

Examples

if(requireNamespace("plotly",quietly=TRUE)) {
  identity |> vc_area(c(-1,1),breaks=0) |> vc_plot_area(f=identity)
}

vectorialcalculus documentation built on Nov. 17, 2026, 1:09 a.m.