View source: R/MizerScan-class.R
| plot.MizerScan | R Documentation |
MizerScan objects
Draws the result of a
scanModel() run: the measured quantity against the
quantity that was scanned, with a band showing the range the quantity takes
over the attractor wherever that attractor is not a fixed point.
## S3 method for class 'MizerScan'
plot(
x,
species = NULL,
style = c("ribbon", "envelope", "line"),
highlight = NULL,
log_x = FALSE,
log_y = TRUE,
log = NULL,
xlim = c(NA, NA),
ylim = c(NA, NA),
y_ticks = 6,
reference_lines = TRUE,
mark_max = FALSE,
show_unsettled = TRUE,
return_data = FALSE,
...
)
x |
A |
species |
The species to show. By default all series in the scan. |
style |
One of |
highlight |
Name or vector of names of the species to be highlighted with a thicker line. |
log_x, log_y, log |
Whether to use logarithmic axes, see |
xlim, ylim |
Numeric vectors of length two giving the axis limits. Use
|
y_ticks |
The approximate number of ticks desired on the y axis. |
reference_lines |
Whether to draw the reference lines stored in the scan, or a named numeric vector of x positions to draw instead. |
mark_max |
Whether to mark, for each series, the scanned value at which
the measured quantity is largest. See |
show_unsettled |
Whether to mark the scan values where the model did not settle onto an attractor. |
return_data |
Whether to return the data frame used for the plot instead of the plot itself. |
... |
Unused. |
A model that settles on a fixed point contributes a single value, so the band has zero width there. A model that settles on a limit cycle contributes the average over one period as the line and the range over that period as the band, so a Hopf bifurcation shows up as the scan value at which the band opens up.
Scan values where the model reached neither a fixed point nor a limit cycle within the time allowed are marked with a cross, because the value plotted there is only an average over the last few years of a run that was still changing.
A ggplot2 object, unless return_data = TRUE, in which case the data
frame used for the plot is returned.
scanModel(), MizerScan(), plotting_functions
Other scan functions:
MizerScan(),
plotYieldVsF(),
scanEffort(),
scanModel()
scan <- scanModel(NS_params, scan_values = seq(0, 1, 0.25),
set_func = scanEffort(), species = c("Cod", "Herring"))
plot(scan)
plot(scan, style = "envelope", mark_max = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.