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("yellow", "red", "green", "purple"))
#Making a legend. First extract the model order:
fct[[2]]
#Then use the legend function - note you may need to play around with the
#legend location depending on your data.
legend("topleft", legend=c("ContOne", "DiscOne","Linear", "Intercept"), fill =
c("yellow", "red", "green", "purple"))
Run the code above in your browser using DataLab