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,
...
)
data.frame of curve fittings returned by get_fitting()
.
growing season division object returned by season()
and season_mov()
.
data.frame of original vegetation time series, with the columns
of t
, y
and QC_flag
. If not specified, it will be determined from d_fit
.
String, title of figure.
String, title of xlab
and ylab
.
ticks of y axis
Font size of axis.text
ggplot theme
point size for VI observation.
the shape of input VI observation? line
or point
text.x
angle
Boolean
(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)
#> Warning: Unknown argument 'id' has been passed.
#> Warning: Unknown argument 'id' has been passed.
#> Warning: Unknown argument 'id' has been passed.
#> Warning: Unknown argument 'id' has been passed.
#> Warning: Unknown argument 'id' has been passed.
#> Warning: Unknown argument 'id' has been passed.
#> Warning: Unknown argument 'id' has been passed.
g <- plot_curvefits(d_fit, brks2)
grid::grid.newpage(); grid::grid.draw(g)