Skip to content

bar

AeroViz.plot.bar.bar

bar(data_set: DataFrame | dict, data_std: DataFrame | None, labels: list[str], unit: str, style: Literal['stacked', 'dispersed'] = 'dispersed', orientation: Literal['va', 'ha'] = 'va', ax: Axes | None = None, symbol=True, **kwargs) -> tuple[Figure, Axes]

Parameters:

Name Type Description Default
data_set DataFrame or dict

A mapping from category names to a list of species mean or a DataFrame with columns as categories and values as means.

required
data_std DataFrame or None

A DataFrame with standard deviations corresponding to data_set, or None if standard deviations are not provided.

required
labels list of str

The species names.

required
unit str

The unit for the values.

required
style (stacked, dispersed)

Whether to display the bars stacked or dispersed.

'stacked'
orientation (va, ha)

The orientation of the bars, 'va' for vertical and 'ha' for horizontal.

'va'
ax Axes or None

The Axes object to plot on. If None, a new figure and Axes are created.

None
symbol bool

Whether to display values for each bar.

True
kwargs dict

Additional keyword arguments passed to the barplot function.

{}

Returns:

Type Description
Axes

The Axes object containing the plot.