pytrnsys_process.api.histogram#
- pytrnsys_process.api.histogram(df: DataFrame, columns: list[str], use_legend: bool = True, size: tuple[float, float] = (7.8, 3.9), bins: int = 50, **kwargs: Any) tuple[Figure, Axes][source]#
Create a histogram from the given DataFrame columns.
- 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)
bins (int) – number of histogram bins to be used
**kwargs – Additional keyword arguments to pass on to
pandas.DataFrame.plot().
- Return type:
tuple of (
matplotlib.figure.Figure,matplotlib.axes.Axes)
Examples
>>> api.histogram(simulation.hourly, ["QSrc1TIn"], ylabel="")