[plotter] do not allow overlays to change limits
This commit is contained in:
+6
-1
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user