general_bar_plot

general_bar_plot#

General bar plot comparing multiple metrics for each category with consistent colors, hatching, and customizable font sizes.


πŸ“₯ Arguments#

Name

Type

Required

Description

df

pd.DataFrame

βœ…

DataFrame containing the category column and one or more metric columns.

category_column

str

βœ…

Column name for the x-axis categories (e.g., β€˜Group’, β€˜Condition’).

figsize

tuple

❌

Figure size. Default: (12, 7).

xlabel

str

❌

Label for x-axis.

ylabel

str

❌

Label for y-axis.

title

str

❌

Title of the plot.

legend_loc

str

❌

Legend location. Default: β€˜upper right’.

bar_width

float

❌

Width of bars. Default: 0.25.

color_map

Dict[str, str]

❌

Map from metric name to color.

style_map

Dict[str, str]

❌

Map from metric name to hatch style.

fontsize

float

❌

Base font size for axis labels, tick labels, title, legend, and annotations. Default: 12.

save

str

❌

Base filename to save PNG and PDF.

ax

matplotlib.axes.Axes

❌

Optional matplotlib Axes object.


πŸ“¦ Example Output#

Click to show example code
# Example code for |general_bar_plot| not found.
general_bar_plot