pygeohydro.plot
Contents
pygeohydro.plot
#
Plot hydrological signatures.
Plots includes daily, monthly and annual hydrograph as well as regime curve (monthly mean) and flow duration curve.
Module Contents#
- pygeohydro.plot.exceedance(daily, threshold=0.001)#
Compute exceedance probability from daily data.
- Parameters
daily (
pandas.Series
orpandas.DataFrame
) – The data to be processedthreshold (
float
, optional) – The threshold to compute exceedance probability, defaults to 1e-3.
- Returns
pandas.Series
orpandas.DataFrame
– Exceedance probability.
- pygeohydro.plot.mean_monthly(daily, index_abbr=False)#
Compute mean monthly summary from daily data.
- Parameters
daily (
pandas.Series
orpandas.DataFrame
) – The data to be processed- Returns
pandas.Series
orpandas.DataFrame
– Mean monthly summary.
- pygeohydro.plot.prepare_plot_data(daily)#
Generae a structured data for plotting hydrologic signatures.
- Parameters
daily (
pandas.Series
orpandas.DataFrame
) – The data to be processed- Returns
PlotDataType
– Containingdaily, ``mean_monthly
,ranked
,titles
, andunits
fields.
- pygeohydro.plot.signatures(discharge, precipitation=None, title=None, threshold=0.001, output=None, close=False)#
Plot hydrological signatures with w/ or w/o precipitation.
Plots includes daily hydrograph, regime curve (mean monthly) and flow duration curve. The input discharges are converted from cms to mm/day based on the watershed area, if provided.
- Parameters
discharge (
pd.DataFrame
orpd.Series
) – The streamflows in mm/day. The column names are used as labels on the plot and the column values should be daily streamflow.precipitation (
pd.Series
, optional) – Daily precipitation time series in mm/day. If given, the data is plotted on the second x-axis at the top.title (
str
, optional) – The plot supertitle.threshold (
float
, optional) – The threshold for cutting off the discharge for the flow duration curve to deal with log 0 issue, defaults to \(1^{-3}\) mm/day.output (
str
, optional) – Path to save the plot as png, defaults toNone
which means the plot is not saved to a file.close (
bool
, optional) – Whether to close the figure.