vc_plot_critical_points: Plot critical-point candidates and derivative evidence

View source: R/plot_phase.R

vc_plot_critical_pointsR Documentation

Plot critical-point candidates and derivative evidence

Description

Plot critical-point candidates and derivative evidence

Usage

vc_plot_critical_points(
  result,
  f,
  xlim = NULL,
  n = 401L,
  colors = c(curve = "#24476b", line = "#c44736", point = "#188367", diagnostic =
    "#8250a3"),
  title = NULL,
  xlab = "x",
  ylab = "f(x)"
)

Arguments

result

Result from vc_critical_points(), vc_concavity() or vc_newton(), matching the selected plot function.

f

The same deterministic scalar function used for the calculation. Function values at the stored anchor points must match the result.

xlim

Finite increasing plot bounds. NULL uses the stored search interval, or the accepted Newton iterates with padding.

n

Integer number of curve samples, at least 2. The curve is a sampled visualization, not an exact representation or a continuity test.

colors

Named vector with curve, line, point and diagnostic colors.

title

Optional scalar plot title. NULL uses a descriptive default.

xlab, ylab

Scalar axis labels.

Details

Markers are conditional numerical candidates, not proven extrema. Sampled curves may miss singularities; invalid samples are gaps. Existing scan values and classifications are used without silently recomputing them.

Value

Interactive plotly htmlwidget. Analysis plots have function and derivative-evidence panels; Newton adds actual iteration steps and a residual history panel. Calculations are not rerun.

Examples

if (requireNamespace("plotly",quietly=TRUE)) {
  f <- function(x) x^3-3*x
  f |> vc_critical_points(c(-2,2)) |> vc_plot_critical_points(f=f)
}

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