diff --git a/sfm/report_pdf.py b/sfm/report_pdf.py index a793b08..794c836 100644 --- a/sfm/report_pdf.py +++ b/sfm/report_pdf.py @@ -856,9 +856,12 @@ def _draw_waveform_subplot(fig, gridspec_cell, rd: ReportData) -> None: order = ["MicL", "Long", "Vert", "Tran"] has_sc = bool(rd.sensor_check_waveforms) if has_sc: - # main lanes + a narrow sensor-check strip column on the right - inner = gridspec_cell.subgridspec(4, 2, width_ratios=[1.0, 0.15], - wspace=0.04, hspace=0.0) + # main lanes + a narrow sensor-check strip column, flush against the + # main panel (BW shares the border — no gap), with the "0.0" baseline + # labels moved to the right of the strip. Proportions match BW's + # Event Report (main ~0.75 / strip ~0.10 of the panel width). + inner = gridspec_cell.subgridspec(4, 2, width_ratios=[1.0, 0.13], + wspace=0.0, hspace=0.0) else: inner = gridspec_cell.subgridspec(4, 1, hspace=0.0) sr = rd.sample_rate_sps or 1024 @@ -902,9 +905,12 @@ def _draw_waveform_subplot(fig, gridspec_cell, rd: ReportData) -> None: # Channel label on the LEFT (matches BW) ax.set_ylabel(ch, fontsize=8, rotation=0, ha="right", va="center", color=_channel_axis_color(ch), weight="bold", labelpad=14) - # "0.0" on the RIGHT (BW convention) - ax.text(1.005, 0.5, "0.0", transform=ax.transAxes, - fontsize=7, color="#555", va="center", ha="left") + # "0.0" baseline label on the RIGHT (BW convention). With the sensor- + # check strip attached, it goes to the right of the STRIP (drawn below); + # otherwise just outside the main lane. + if not has_sc: + ax.text(1.005, 0.5, "0.0", transform=ax.transAxes, + fontsize=7, color="#555", va="center", ha="left") ax.grid(True, linestyle="--", linewidth=0.3, color="#bbb", alpha=0.6) # Vertical dashed trigger line at t=0 @@ -944,6 +950,9 @@ def _draw_waveform_subplot(fig, gridspec_cell, rd: ReportData) -> None: scx.set_xticks([]); scx.set_yticks([]) for _s in scx.spines.values(): _s.set_linewidth(0.4); _s.set_color("#999") + # "0.0" baseline label to the RIGHT of the strip (BW convention) + scx.text(1.10, 0.5, "0.0", transform=scx.transAxes, + fontsize=7, color="#555", va="center", ha="left") # Trigger triangle marker ▼ above the top channel at t=0 top_ax = main_axes[0] # MicL