Grouped row-layout plotting helper from _plotting/_row_plots.py.
This module currently exposes a single function:
plot_columns
Use plot_columns(...) to render a one-row panel of grouped bar plots with swarm overlays from a plain DataFrame.
def plot_columns(df,columns2plot,columns2plot_titles,y_groupby,figsize,sharex,sharey):import adata_science_tools as adtl
adtl.plot_columns(
df=df,
columns2plot=["Age", "CRP", "Albumin"],
columns2plot_titles=["Age", "CRP", "Albumin"],
y_groupby="Outcome",
figsize=(18, 6),
sharex=False,
sharey=True,
)multi_metric — Grouped covariate summaries. Data and analysis provenance.
- Input is a plain
DataFrame. columns2plotandcolumns2plot_titlesare matched positionally.y_groupbyis used as the grouping variable on the y-axis in every subplot.- Each subplot uses
sns.barplot(...)plus asns.swarmplot(...)overlay. - The color palette comes from
adata_science_tools._plotting.palettes.godsnot_102. - The function calls
plt.tight_layout()while building the figure.
The current implementation does not explicitly return the figure or axes. Treat it as a plotting side-effect helper.
Direct plot_columns(...) regression coverage is in tests/test_general_plot_renderers.py.
