[plotter] do not allow overlays to change limits
This commit is contained in:
+6
-1
@@ -686,11 +686,16 @@ class Plotter(Aggregator, BaseProcessor):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
plot_overlay = self.overlays[plot_overlay]
|
plot_overlay = self.overlays[plot_overlay]
|
||||||
|
xlim = plt.xlim()
|
||||||
|
ylim = plt.ylim()
|
||||||
try:
|
try:
|
||||||
plot_overlay(ax_los, im_extent, **overlays_kwargs[i])
|
plot_overlay(ax_los, im_extent, **overlays_kwargs[i])
|
||||||
except IndexError:
|
except IndexError:
|
||||||
plot_overlay(ax_los, im_extent)
|
plot_overlay(ax_los, im_extent)
|
||||||
|
finally:
|
||||||
|
# Restore previous limits in case overlays changed it
|
||||||
|
plt.xlim(xlim)
|
||||||
|
plt.ylim(ylim)
|
||||||
if embeded:
|
if embeded:
|
||||||
plt.subplots_adjust(left=0, right=1, top=1, bottom=0)
|
plt.subplots_adjust(left=0, right=1, top=1, bottom=0)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user