plot_curvefits {phenofit} | R Documentation |
plot_curvefits
Description
plot_curvefits
Usage
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,
...
)
Arguments
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 |
Examples
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)
[Package phenofit version 0.3.9 Index]