Plotting¶
All plot methods are available on the WRTDS class and return a matplotlib.figure.Figure.
The underlying functions in wrtds.plots can also be called directly for more control.
Data Overview Plots¶
plot_overview¶
A 2x2 panel showing discharge time series, concentration vs time, concentration vs discharge, and monthly concentration box plots.
The individual panels can be created separately using the functions in
wrtds.plots.data_overview:
plot_q_time_daily(daily)— daily discharge time series (log-scale y-axis)plot_conc_time(sample)— concentration vs time (open circles for censored data)plot_conc_q(sample)— log-log concentration vs dischargebox_conc_month(sample)— box plots of concentration by monthbox_q_twice(daily, sample)— side-by-side discharge distributions for all days vs sample days
Result Plots¶
plot_conc_hist¶
Annual mean concentration as bars with the flow-normalised trend line overlaid. If WRTDS-K has been run, the generalized concentration line is also shown.
plot_flux_hist¶
Same as above but for flux. The flux_factor parameter can convert units.
plot_contours¶
Filled contour plot of a surface layer. The layer parameter selects which surface
to plot:
layer=0— predicted log-concentration (yHat)layer=1— standard error (SE)layer=2— bias-corrected concentration (ConcHat, the default)
Additional functions in wrtds.plots.results:
plot_conc_q_smooth(surfaces, surface_index, years)— C-Q curves at selected yearsplot_conc_time_smooth(surfaces, surface_index, logq_values)— concentration-time curves at selected dischargesplot_diff_contours(surfaces1, surfaces2, surface_index)— difference contour between two surfaces
Diagnostic Plots¶
plot_residuals¶
A 6-panel diagnostic display:
The six panels are:
- Predicted vs observed concentration
- Predicted vs observed flux
- Residuals vs predicted concentration
- Residuals vs log-discharge
- Residuals vs time (with running-mean smooth)
- Monthly box plots of residuals
plot_conc_pred¶
Predicted vs observed concentration scatter plot with 1:1 reference line.
All individual diagnostic functions are in
wrtds.plots.diagnostics.
Saving Figures¶
All plot methods return a matplotlib.figure.Figure:
Using the Low-Level API¶
For full control, use the functions in wrtds.plots directly: