diff --git a/ultraplot/figure.py b/ultraplot/figure.py index 798378909..aebb9e777 100644 --- a/ultraplot/figure.py +++ b/ultraplot/figure.py @@ -903,7 +903,9 @@ def _snap_axes_to_pixel_grid(self, renderer) -> None: minw = invw minh = invh - for ax in self._iter_axes(hidden=False, children=False, panels=True): + # Only snap main subplot axes. Guide/panel axes host legends/colorbars + # that use their own fractional placement and can be over-constrained. + for ax in self._iter_axes(hidden=False, children=False, panels=False): bbox = ax.get_position(original=False) old = np.array([bbox.x0, bbox.y0, bbox.x1, bbox.y1], dtype=float) new = np.array(