imod.visualize.waterbalance_barchart#

imod.visualize.waterbalance_barchart(df, inflows, outflows, datecolumn=None, format='%Y-%m-%d', ax=None, unit=None, colors=None)[source]#
Parameters:
  • df (pandas.DataFrame) – The dataframe containing the water balance data.

  • inflows (listlike of str)

  • outflows (listlike of str)

  • datecolumn (str, optional)

  • format (str, optional,)

  • ax (matplotlib.Axes, optional)

  • unit (str, optional)

  • colors (listlike of strings or tuples)

Returns:

ax

Return type:

matplotlib.Axes

Examples

>>> fig, ax = plt.subplots()
>>> imod.visualize.waterbalance_barchart(
>>>    ax=ax,
>>>    df=df,
>>>    inflows=["Rainfall", "River upstream"],
>>>    outflows=["Evapotranspiration", "Discharge to Sea"],
>>>    datecolumn="Time",
>>>    format="%Y-%m-%d",
>>>    unit="m3/d",
>>>    colors=["#ca0020", "#f4a582", "#92c5de", "#0571b0"],
>>>    )
>>> fig.savefig("Waterbalance.png", dpi=300, bbox_inches="tight")