MCPcopy Create free account
hub / github.com/Emmimal/control-layer / chart_1_pass_rate

Function chart_1_pass_rate

demo.py:445–456  ·  view source on GitHub ↗
(naive_rate, cl_rate, ax)

Source from the content-addressed store, hash-verified

443
444
445def chart_1_pass_rate(naive_rate, cl_rate, ax):
446 labels = ["Naive\n(no control layer)", "Control Layer\n(retry + fallback)"]
447 values = [naive_rate, cl_rate]
448 colors = [CHART_COLOR_FAIL, CHART_COLOR_PASS]
449 bars = ax.bar(labels, values, color=colors, width=0.5, edgecolor="white", linewidth=1.5)
450 for bar, val in zip(bars, values):
451 ax.text(bar.get_x() + bar.get_width() / 2, bar.get_height() + 1.5,
452 f"{val:.0f}%", ha="center", va="bottom", fontsize=12,
453 fontweight="bold", color=CHART_COLOR_DARK)
454 ax.set_ylim(0, 115)
455 ax.axhline(100, color=CHART_GRID, linewidth=1, linestyle=":")
456 _apply_base_style(ax, "Pass Rate: Naive vs Control Layer", "", "Pass Rate (%)")
457
458
459def chart_2_failure_dist(audit, ax):

Callers 1

generate_all_chartsFunction · 0.85

Calls 1

_apply_base_styleFunction · 0.85

Tested by

no test coverage detected