TFVPlotagainstObserved {TUFLOWR} | R Documentation |
ggplot of TFV model runs and observed data
Description
ggplot of TFV model runs and observed data
Usage
TFVPlotagainstObserved(
Sim,
Obs,
ylab,
file,
width = 17,
height = 22,
order = NULL,
scales = "fixed",
cols = NULL,
newnames = NULL,
ylim = NA,
nlegendrow = 1
)
Arguments
Sim |
modelled output, imported using 'TFVGetResults()' |
Obs |
observed data. This is bind_rows() to Sim, so requires the same columns and headings. Obs can be NULL if all data of interest is in Sim |
ylab |
label for y axis |
file |
file to save figure to |
width |
width of image in cm, default to 17 |
height |
height of image in cm, default to 22 |
order |
character vector of site IDs to order the plots in. Default to NULL, which will plot in alphabetical order |
scales |
control the y axis scales across the facets plots. default to fixed, the same scale across all plots. Change to free_y to have scales dependent on the data for each plot |
cols |
vector of colours to plot each line. Defaults to DEW style 2 greens and 2 blues. Defaults will fail if more than 4 RunNames. |
newnames |
named vector to label the facets on the plot. vector elements should be the new text to use, names should be the names in the data |
ylim |
- specify y axis limits manually as two number vector, e.g. c(0,1) |
nlegendrow |
- specify the number of rows in the legend, increase this if the scenario names go off the figure. Defaults to 1 |
Value
Nothing is returned to the R environment. The generated figure is saved to file.
Examples
## Not run:
stations<-c("A4261043", "A4261134","A4261135","A4260572","A4260633","A4261209","A4261165")
TFVPlotagainstObserved(Sim,Obs,"Salinity (g/L)","salinity.png",order=stations)
## End(Not run)