vc_plot_concavity: Plot sampled concavity and smooth inflection candidates

View source: R/plot_phase.R

vc_plot_concavityR Documentation

Plot sampled concavity and smooth inflection candidates

Description

Plot sampled concavity and smooth inflection candidates

Usage

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)"
)

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.

Value

Interactive plotly widget with sampled curvature labels in hover and inflection candidate markers; no proof of inflection is implied.

Examples

if (requireNamespace("plotly",quietly=TRUE)) {
  f <- function(x) x^3
  f |> vc_concavity(c(-1,1)) |> vc_plot_concavity(f=f)
}

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