plot.threshold | R Documentation |
S3 method for class 'threshold'. plot.threshold
creates
plots for objects of class threshold, using the R base plotting framework.
Plots of single or multiple threshold models can be constructed.
## S3 method for class 'threshold' plot( x, xlab = NULL, ylab = NULL, multPlot = TRUE, pch = 16, cex = 1.2, pcol = "black", ModTitle = NULL, TiAdj = 0, TiLine = 0.5, cex.main = 1.5, cex.lab = 1.3, cex.axis = 1, yRange = NULL, lwd = 2, lcol = "red", di = NULL, ... )
x |
An object of class 'threshold'. |
xlab |
Title for the x-axis. Defaults will depend on any axes log-transformations. |
ylab |
Title for the y-axis.Defaults will depend on any axes log-transformations. |
multPlot |
Whether separate plots should be built for each model fit (default = TRUE) or all model fits should be printed on the same plot (FALSE) |
pch |
Plotting character (for points). |
cex |
A numerical vector giving the amount by which plotting symbols (points) should be scaled relative to the default. |
pcol |
Colour of the points. |
ModTitle |
Plot title (default is |
TiAdj |
Which way the plot title is justified. |
TiLine |
Places the plot title this many lines outwards from the plot edge. |
cex.main |
The amount by which the plot title should be scaled relative to the default. |
cex.lab |
The amount by which the axis titles should be scaled relative to the default. |
cex.axis |
The amount by which the axis labels should be scaled relative to the default. |
yRange |
The range of the y-axis. Default taken as the largest value bacross the observed and fitted values. |
lwd |
Line width. |
lcol |
Line colour. If |
di |
Dimensions to be passed to |
... |
Further graphical parameters (see |
The raw lm
model fit objects are returned with the
sar_threshold
function if the user wishes to construct their
own plots.
Use par(mai = c())
prior to calling plot, to set the graph margins,
which can be useful when plotting multiple models in a single plot to ensure
space within the plot taken up by the individual model fit plots is
maximised.
data(aegean) #fit two threshold models (in logA-S space) and the linear and #intercept only models fct <- sar_threshold(aegean, mod = c("ContOne", "DiscOne"), non_th_models = TRUE, interval = 5, parallel = FALSE, logAxes = "area") #plot using default settings plot(fct) #change various plotting settings, and set the graph margins prior to #plotting par(mai = c(0.7,0.7, 0.4, 0.3)) plot(fct, pcol = "blue", pch = 18, lcol = "green", ModTitle = c("A", "B", "C", "D"), TiAdj = 0.5, xlab = "Yorke") #Plot multiple model fits in the same plot, with different colour for each #model fit plot(fct, multPlot = FALSE, lcol = c("black", "red", "green", "purple"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.