diff --git a/plotter.py b/plotter.py index 978450c..a201815 100644 --- a/plotter.py +++ b/plotter.py @@ -686,11 +686,16 @@ class Plotter(Aggregator, BaseProcessor): ) else: plot_overlay = self.overlays[plot_overlay] + xlim = plt.xlim() + ylim = plt.ylim() try: plot_overlay(ax_los, im_extent, **overlays_kwargs[i]) except IndexError: plot_overlay(ax_los, im_extent) - + finally: + # Restore previous limits in case overlays changed it + plt.xlim(xlim) + plt.ylim(ylim) if embeded: plt.subplots_adjust(left=0, right=1, top=1, bottom=0)