From a74ca012876924e79ab8a3af75bba7f9211f4c62 Mon Sep 17 00:00:00 2001 From: iamdoubz <> Date: Fri, 1 May 2026 00:09:12 -0500 Subject: [PATCH] Fix bug where a new colorbar figure would appear on each valid scan --- renderer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/renderer.py b/renderer.py index d24ab42..88f22ce 100644 --- a/renderer.py +++ b/renderer.py @@ -62,6 +62,10 @@ def render_heatmap( if fig is None or ax is None: fig, ax = plt.subplots(figsize=(10, 7)) + # Remove any colorbars left over from previous renders. + # Colorbars attach to the figure, not the axes, so ax.clear() doesn't touch them. + for ax_obj in fig.axes[1:]: # axes[0] is the main plot; everything else is a colorbar + ax_obj.remove() ax.clear() points, values = session.get_points_and_values_multi(bssids)