# \donttest{
data("datacerardat")
resultat = cerardat(df = datacerardat$df,
row.sup = datacerardat$row.sup,
date = datacerardat$date,
nf = NULL,
confidence = 0.95,
graph = TRUE
)
#Plot the first 5 with their dateEv fit as vertical line
arrangePlot(resultat,
which = 1:5,
date = resultat$prediction$Fit_dateEv[1:5]
)
arrangePlot(resultat,
which = 1:5,
xlim = c(300, 600),
date = resultat$prediction$Fit_dateEv[1:5]
)
#Plot using row names and highlighting custom dates
arrangePlot(resultat,
which = c("Z067","Z070","Z074"),
main = "Neuvy-Le-Roi",
xlim = c(300, 1300),
date = c(669, 745, 850, 1115),
col_date = c("red", rgb(0.20, 0.40, 0.30), 4, '#5614be')
)
#You can change the line type (lty) and the color of the curve
arrangePlot(resultat,
which = c("Z067", "Z070", "Z074"),
main = "Neuvy-Le-Roi",
col1 = rgb(0.7, 0.7, 0.7, 0.6), # the last arg of rgb is alpha for opacity
col2 = "black",
xlim = c(300, 1300),
date = c(669, 745, 850, 1115),
col_date = "grey50",
lty_date = c(1, 2, 3, 4) # 1: line, 2: dashed line, 3: dotted line, 4:mixed dotted dashed line)
)
#Default first 10 plot
arrangePlot(resultat, which = 1:10)
#You can remove the box arround the plot region
arrangePlot(resultat,
which = 1:10,
xlim = c(200, 1000), # fix the x axis between 200 and 1000
date = seq(250, 950, 50), # add one line every 50 years between 250 and 950
col_date = "grey80",
lty_date = 3, # dotted line (1: line, 2: dashed line)
bty = 'n', # remove box ('L': keep bottom and left)
cex.axis = 0.8 # control axis text size (only y axis here)
)
#minimalist version (remove y-axis)
arrangePlot(resultat,
which = 1:10,
xlim = c(200, 1000), # fix the x axis between 200 and 1000
date = seq(250, 950, 50), # add one line every 50 years between 250 and 950
col_date = "grey80",
lty_date = 3, # dotted line (1: line, 2: dashed line)
ylab = '', # remove the y-axis name ('Density')
fg = rgb(0, 0, 0, 0), # color box transparent (invisible)
col.axis = rgb(0, 0, 0, 0),# color axis text (only y axis here) transparent (invisible)
ov = "none" # remove the overlap percentage
)
# }
Run the code above in your browser using DataLab