Part of #305.
Problem
The "benchmark result" figure — grouped method × condition accuracy bars with
value labels and a chance line — is built entirely by hand in γ-secretase cell
28: manual x ± w/2 offsets, a per-bar ax.text annotation loop, and a manual
axhline(50) chance line:
b1 = ax.bar(x - w/2, res_scale, w, label="Scale-based", color="tab:gray")
b2 = ax.bar(x + w/2, res_cpp, w, label="CPP", color="tab:red")
ax.axhline(50, ls="--", color="black", lw=1)
for bars in (b1, b2):
for b in bars:
ax.text(b.get_x()+b.get_width()/2, b.get_height()+1, f"{b.get_height():.0f}", ...)
This grouped-comparison-with-baseline figure recurs across the paper.
Goal
Provide aa.plot_comparison(df_eval, baseline=50, annotate=True, ...) that draws
a grouped barplot from a tidy eval frame with per-bar value labels and an
optional chance/baseline line — one call replacing the manual matplotlib.
Requirements
KPIs / Acceptance criteria
Scope / non-goals
Dependencies
Standards checklist
Part of #305.
Problem
The "benchmark result" figure — grouped method × condition accuracy bars with
value labels and a chance line — is built entirely by hand in γ-secretase cell
28: manual
x ± w/2offsets, a per-barax.textannotation loop, and a manualaxhline(50)chance line:This grouped-comparison-with-baseline figure recurs across the paper.
Goal
Provide
aa.plot_comparison(df_eval, baseline=50, annotate=True, ...)that drawsa grouped barplot from a tidy eval frame with per-bar value labels and an
optional chance/baseline line — one call replacing the manual matplotlib.
Requirements
aa.plot_comparison(df_eval, group=..., condition=..., value=..., baseline=50, annotate=True, ax=None)returning the
Axes.baseline line with a label.
plot_get_clist; followsplotting.md.Examplesinclude.KPIs / Acceptance criteria
axhline code and renders an equivalent grouped barplot.
bad input →
ValueError).Scope / non-goals
Dependencies
Standards checklist
__init__.py/__all__) · plotting.md compliance · numpydoc· tests · no-print