From 6ad4fd73dd1eb17e7b29e7c663d593cd12f9212b Mon Sep 17 00:00:00 2001 From: serversdown Date: Mon, 14 Sep 2026 20:21:17 +0000 Subject: [PATCH] fix(compliance): square plot box (set_box_aspect) so the chart isn't squashed The compliance chart sits in the short, wide mic-and-USBM band on the event report; without a fixed aspect matplotlib stretched it wide-and-short. Force a square plot box, which is how log-log compliance charts are conventionally drawn. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01YDXjZCr4RqT2U3QvMDhgzf --- sfm/compliance.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sfm/compliance.py b/sfm/compliance.py index 2b21585..bdc4692 100644 --- a/sfm/compliance.py +++ b/sfm/compliance.py @@ -120,6 +120,7 @@ def draw_compliance_chart(ax, channels: Dict[str, Sequence[float]], sps: float) ax.set_yscale("log") ax.set_xlim(1, 100) ax.set_ylim(0.0394, 10) + ax.set_box_aspect(1) # square plot box (log-log compliance charts are square) xt = [1, 2, 5, 10, 20, 50, 100] yt = [0.0394, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10] ax.xaxis.set_major_locator(FixedLocator(xt)); ax.xaxis.set_minor_locator(NullLocator())