diff --git a/sfm/report_pdf.py b/sfm/report_pdf.py index 60dca98..f0e7a97 100644 --- a/sfm/report_pdf.py +++ b/sfm/report_pdf.py @@ -578,15 +578,16 @@ def _draw_mic_and_usbm(ax, rd: ReportData) -> None: _kv(ax, 0.0, y, label, value, label_w=0.18) y -= 0.15 - # USBM chart placeholder — upper-right. Real piecewise compliance - # curves are a separate work item; for now this just shows the title - # + a "see report" message so the layout is correct. - ax.text(0.72, 0.97, "USBM RI8507 And OSMRE", - fontsize=9, weight="bold", color="#333", ha="center", va="top", - transform=ax.transAxes) - ax.text(0.72, 0.50, "[compliance chart\ncoming soon]", - fontsize=8, color="#bbb", ha="center", va="center", - transform=ax.transAxes, style="italic") + # USBM RI8507 compliance chart — inset axes in the right half of this band. + ax.text(0.74, 1.00, "USBM RI8507", fontsize=9, weight="bold", color="#333", + ha="center", va="top", transform=ax.transAxes) + if rd.channels and rd.sample_rate_sps: + from sfm.compliance import draw_compliance_chart + inset = ax.inset_axes([0.52, 0.02, 0.46, 0.82]) + draw_compliance_chart(inset, rd.channels, rd.sample_rate_sps) + else: + ax.text(0.74, 0.48, "(no waveform data)", fontsize=8, color="#bbb", + ha="center", va="center", transform=ax.transAxes, style="italic") def _mic_rows(rd: ReportData) -> list[tuple[str, Optional[str]]]: