pytrnsys_process.plot.plot_wrappers.bar_chart#
- pytrnsys_process.plot.plot_wrappers.bar_chart(df: DataFrame, columns: list[str], use_legend: bool = True, size: tuple[float, float] = (7.8, 3.9), **kwargs: Any) tuple[Figure, Axes][source]#
Create a bar chart with multiple columns displayed as grouped bars. The **kwargs are currently not passed on.
- Parameters:
df (pandas.DataFrame) – the dataframe to plot
use_legend (bool, default 'True') – whether to show the legend or not
size (tuple of (float, float)) – size of the figure (width, height)
**kwargs – Additional keyword arguments to pass on to
pandas.DataFrame.plot().
- Return type:
tuple of (
matplotlib.figure.Figure,matplotlib.axes.Axes)
Examples
>>> api.bar_chart(simulation.monthly, ["QSnk60P","QSnk60PauxCondSwitch_kW"])