View source: R/plot_curvefits.R
plot_curvefits | R Documentation |
plot_curvefits
plot_curvefits(
d_fit,
seasons,
d_obs = NULL,
title = NULL,
xlab = "Time",
ylab = "Vegetation Index",
yticks = NULL,
font.size = 14,
theme = NULL,
cex = 2,
shape = "point",
angle = 30,
show.legend = TRUE,
layer_extra = NULL,
...
)
d_fit |
data.frame of curve fittings returned by |
seasons |
growing season division object returned by |
d_obs |
data.frame of original vegetation time series, with the columns
of |
title |
String, title of figure. |
xlab , ylab |
String, title of |
yticks |
ticks of y axis |
font.size |
Font size of axis.text |
theme |
ggplot theme |
cex |
point size for VI observation. |
shape |
the shape of input VI observation? |
angle |
|
show.legend |
Boolean |
layer_extra |
(not used) extra ggplot layers |
... |
ignored |
data("CA_NS6")
d = CA_NS6
nptperyear <- 23
INPUT <- check_input(d$t, d$y, d$w, QC_flag = d$QC_flag,
nptperyear = nptperyear, south = FALSE,
maxgap = nptperyear/4, alpha = 0.02, wmin = 0.2)
# plot_input(INPUT)
# Rough fitting and growing season dividing
wFUN <- "wTSM"
brks2 <- season_mov(INPUT,
options = list(
rFUN = "smooth_wWHIT", wFUN = wFUN,
r_min = 0.05, ypeak_min = 0.05,
lambda = 10,
verbose = FALSE
))
# plot_season(INPUT, brks2, d)
# Fine fitting
fits <- curvefits(
INPUT, brks2,
options = list(
methods = c("AG", "Beck", "Elmore", "Zhang"), #,"klos", "Gu"
wFUN = wFUN,
nextend = 2, maxExtendMonth = 2, minExtendMonth = 1, minPercValid = 0.2
)
)
r_param = get_param(fits)
r_pheno = get_pheno(fits)
r_gof = get_GOF(fits)
d_fit = get_fitting(fits)
g <- plot_curvefits(d_fit, brks2)
grid::grid.newpage(); grid::grid.draw(g)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.