[misc] May last round of bug corrections

This commit is contained in:
Noe Brucy
2022-05-31 16:15:33 +02:00
parent 6c912a5294
commit 124f24f92c
6 changed files with 129 additions and 107 deletions
+15 -16
View File
@@ -109,15 +109,15 @@ def quiver(ax, map_h, map_v, extent, key_v=None, label="", **kwargs):
# add vector key
if key_v is None:
key_v = (max_v + min_v) / 2.0
ax.quiverkey(
vec_field,
0.6,
0.98,
key_v,
f"${key_v:g}$ {label}",
labelpos="E",
coordinates="figure",
)
ax.quiverkey(
vec_field,
0.6,
0.98,
key_v,
f"${key_v:g}$ {label}",
labelpos="E",
coordinates="figure",
)
def line_integral_convolution(ax, map_h, map_v, extent, **kwargs):
@@ -793,7 +793,7 @@ class Plotter(Aggregator, BaseProcessor):
except AttributeError:
cbar = plt.colorbar()
if label is not None:
if text_embeded:
if colorbar_embeded:
cbar.set_label(" " + label, color=overtext_color, loc="bottom")
else:
cbar.set_label(label)
@@ -824,14 +824,13 @@ class Plotter(Aggregator, BaseProcessor):
plot_overlay = self.overlays[plot_overlay]
xlim = plt.xlim()
ylim = plt.ylim()
try:
if len(overlays_kwargs) > i:
plot_overlay(ax_los, im_extent, **overlays_kwargs[i])
except IndexError:
else:
plot_overlay(ax_los, im_extent)
finally:
# Restore previous limits in case overlays changed it
plt.xlim(xlim)
plt.ylim(ylim)
plt.xlim(xlim)
plt.ylim(ylim)
return PlotInfo(
plot_type=PlotType.IMAGE,