| vc_plot_concavity | R Documentation |
Plot sampled concavity and smooth inflection candidates
vc_plot_concavity(
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. |
Interactive plotly widget with sampled curvature labels in hover and inflection candidate markers; no proof of inflection is implied.
if (requireNamespace("plotly",quietly=TRUE)) {
f <- function(x) x^3
f |> vc_concavity(c(-1,1)) |> vc_plot_concavity(f=f)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.