View source: R/plot_derivative_matrices.R
| vc_plot_matrix | R Documentation |
Inspect a numerical derivative matrix and its stored refinements
vc_plot_matrix(
result,
colors = c(negative = "#24476b", zero = "#ffffff", positive = "#c44736", unresolved =
"#dd8800"),
alpha = 0.95,
digits = 5L,
show_values = TRUE,
show_diagnostics = TRUE,
slider = TRUE,
title = NULL
)
result |
A vc_jacobian() or vc_hessian() result. |
colors |
Named negative, zero, positive and unresolved Plotly/CSS colors. |
alpha |
Finite heatmap opacity between zero and one. |
digits |
Integer significant digits in displayed cell labels, 1 to 15; hover retains a more precise estimate. |
show_values |
Logical; display rounded values as cell annotations. |
show_diagnostics |
Logical; mark entries whose full sensitivity checks failed. Flags refer to the three-scale diagnostic, not only the visible level. |
slider |
Logical; allow selection among the three stored refinement matrices. FALSE draws only the finest matrix. |
title |
Optional scalar title. Default identifies matrix type, the selected relative refinement level and the numerical-only interpretation. |
Jacobian rows are outputs and columns are input coordinates; Hessian rows/columns are input coordinates. The first row is at the top. No derivatives are recomputed. Relative levels mean initial steps, halves and quarters, not a common absolute step for differently scaled coordinates. Hessian symmetry is imposed by its rectangle stencil, not established as equality/existence of ordered mixed partials. No extremum classification or total differentiability certificate is inferred from colors or flags.
Plotly matrix widget with correctly labeled rows and columns, numeric hover, optional values, unresolved-entry markers and refinement selector. Slider changes both the matrix and its value annotations.
if(requireNamespace("plotly",quietly=TRUE)) {
f <- function(v)v[1]^2+v[1]*v[2]+2*v[2]^2
f |> vc_hessian(c(1,1),h=.01) |> vc_plot_matrix()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.