plotFun.ts.orig | R Documentation |
Plot a time series plot, with the possibility of applying a temporal aggregation (see data_agg
).
plotFun.ts.orig(data, dates, hour = FALSE, agg = NULL, aggFun = "mean", season = NULL, output.data = FALSE, stn.together = FALSE, col.lines = rainbow(10), title = NULL, input.mch = FALSE)
data |
Matrix with the data to be plotted (time steps in rows, stations in columns). The column names are used for labels in the plot, otherwise a,b,c,... are used. |
dates |
Vector of dates (POSIX class) of the original data. |
hour |
logical. Is the input data hourly? Hourly data can only use aggregation 'D'. Default: FALSE. |
agg |
Level of temporal aggregation: daily ("D", only for hourly input data), monthly ("M"), seasonal ("S"), annual ("Y"). Default: NULL (all data is plotted using the original temporal resolution). This argument is only valid for |
aggFun |
Function for temporal aggregation, if desired. Possible values: mean, median, min, max. Default: mean. |
season |
Vector with the desired month (season) to be plotted, e.g. 8 is August, c(6,7,8) is JJA, with the operation of 'aggFun'. Default: NULL (no seasonal/monthly slice considered). |
output.data |
Logical, return plotted data or not. Default: FALSE. |
stn.together |
Logical, set to TRUE to plot all stations with colour lines in one plot. Default: FALSE. Only available for time series plots. |
col.lines |
Vector with colours for lines. Only available for time series plots. |
title |
character string with the main title. A 1-element vector would set the same title to all subplots, a n-element vector would have the titles for n subplots. |
input.mch |
logical. If the input data is from DWH, the hourly needs to be aggregated differently. See |
Plot time series of one vector. It is possible to plot the "raw" series or aggregate it temporarily or display a specific season/month. If the input data is a matrix, by default a separate panel is obtained for each station. 'stn.together' allows to plot all stations together (without subplot).
A time series plot. Plotted data if 'output.data'=TRUE. The result is a list with the aggregated data, aggregated dates, function and type of aggregation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.