View source: R/plot_stationary.R
| vc_plot_stationary | R Documentation |
Inspect two-dimensional stationary candidates and search evaluations
vc_plot_stationary(
result,
f,
xlim = NULL,
ylim = NULL,
n = 61L,
run = 1L,
show_history = TRUE,
animate = TRUE,
max_frames = 40L,
frame_ms = 300,
colors = c(minimum = "#188367", maximum = "#c44736", saddle = "#8250a3", inconclusive =
"#dd8800", history = "#24476b"),
colorscale = "Viridis",
alpha = 0.6,
marker_size = 10,
line_width = 2,
title = NULL,
xlab = "x",
ylab = "y"
)
result |
Result of vc_stationary_points with two input coordinates. |
f |
Same scalar field used in the search, accepting one vector. |
xlim, ylim |
Finite increasing display bounds; NULL uses the search window, or the range of starts/candidates enlarged by one coordinate unit. |
n |
Integer samples per axis, at least two. Matrix rows represent y and columns x. Nonfinite or unavailable field samples remain gaps. |
run |
Integer run index whose objective evaluation history is shown. |
show_history, animate |
Logical switches. Playback shows stored objective evaluations, not optimizer iterations or a Newton/descent path. |
max_frames |
Positive integer maximum displayed history samples. Deterministic thinning keeps first/last samples; full history stays in result. |
frame_ms |
Positive playback duration in milliseconds. |
colors |
Named minimum, maximum, saddle, inconclusive and history colors. |
colorscale |
Plotly colorscale name or list for the sampled contours. |
alpha |
Opacity between zero and one for search-evaluation markers. |
marker_size |
Positive candidate marker size. |
line_width |
Positive history-line width. |
title |
Optional scalar title. |
xlab, ylab |
Scalar axis labels. |
No derivative or optimization is recomputed. Only f is sampled for context and checked against stored candidate values. Search evaluations may move uphill and include optimizer probes; their connecting polyline is not a mathematical flow. Failed residual evaluations are omitted from geometry but remain in the calculation history. All candidate labels are conditional numerical evidence; this plot does not establish regularity or completeness.
Plotly contour widget with conditional candidate labels and optional evaluation playback. Hover retains residuals, stopping codes and statuses.
if(requireNamespace("plotly",quietly=TRUE)) {
f <- function(v)v[1]^2+2*v[2]^2
r <- vc_stationary_points(f,c(.1,.2),assume_c2=TRUE)
r |> vc_plot_stationary(f=f)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.