slices: numeric vector of calender months to plot, i.e., 1 - 12
tau: numeric vector of quantile to plot. The function will plot the 'middle' quantile if none is specified, e.g., if 0.2, 0.3, and 0.4 are present in the fitted model object then 0.3 will be plotted.
dt_rng: Optional chr string indicating the date range of the plot. Must be two values in the format 'YYYY-mm-dd' which is passed to as.Date.
col_vec: chr string of plot colors to use, passed to gradcols. Any color palette from RColorBrewer can be used as a named input. Palettes from grDevices must be supplied as the returned string of colors for each palette.
predicted: logical indicating if standard predicted values are plotted, default TRUE, otherwise normalized predictions are plotted
logspace: logical indicating if plots are in log space
grids: logical indicating if grid lines are present
pretty: logical indicating if my subjective idea of plot aesthetics is applied, otherwise the ggplot default themes are used
lwd: numeric value indicating width of lines
size: numeric value indicating size of points
alpha: numeric value indicating transparency of points or lines
Returns
A ggplot object that can be further modified
Details
This is a modification of fitplot that can be used to plot selected time slices from the results of a fitted tidal object. For example, all results for a particular month across all years can be viewed. This is useful for evaluating between-year differences in results for constant season. Only one quantile fit can be shown per plot because the grouping variable is mapped to the slices.
Examples
## load a fitted tidal objectdata(tidfit)# plot using defaultssliceplot(tidfit)# get different months - march and septembersliceplot(tidfit, slices = c(3,9))# normalized predictions, 10th percentilesliceplot(tidfit, tau =0.1, predicted =FALSE)# normalized values all months, change line aesthetics, log-space, 90th # add titlelibrary(ggplot2)sliceplot(tidfit, slices =1:12, size =1.5, tau =0.9, alpha =0.6, predicted =FALSE, logspace =TRUE)+ggtitle('Normalized predictions for all months, 90th percentile')## plot a tidalmean object data(tidfitmean) sliceplot(tidfitmean)