| vc_plot_critical_points | R Documentation |
Plot critical-point candidates and derivative evidence
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)"
)
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. |
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.
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.
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.