cavapy 2.0.7__tar.gz → 2.0.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cavapy-2.0.7 → cavapy-2.0.8}/PKG-INFO +1 -1
- {cavapy-2.0.7 → cavapy-2.0.8}/cavapy/cava_plot.py +9 -6
- {cavapy-2.0.7 → cavapy-2.0.8}/pyproject.toml +1 -1
- {cavapy-2.0.7 → cavapy-2.0.8}/LICENSE +0 -0
- {cavapy-2.0.7 → cavapy-2.0.8}/README.md +0 -0
- {cavapy-2.0.7 → cavapy-2.0.8}/cavapy/__init__.py +0 -0
- {cavapy-2.0.7 → cavapy-2.0.8}/cavapy/cava_bias.py +0 -0
- {cavapy-2.0.7 → cavapy-2.0.8}/cavapy/cava_config.py +0 -0
- {cavapy-2.0.7 → cavapy-2.0.8}/cavapy/cava_download.py +0 -0
- {cavapy-2.0.7 → cavapy-2.0.8}/cavapy/cava_validation.py +0 -0
- {cavapy-2.0.7 → cavapy-2.0.8}/cavapy/cavapy.py +0 -0
|
@@ -49,7 +49,11 @@ def plot_spatial_map(
|
|
|
49
49
|
raise ValueError(f"Unsupported aggregation method: {aggregation}")
|
|
50
50
|
|
|
51
51
|
# Create figure with cartopy
|
|
52
|
-
fig, ax = plt.subplots(
|
|
52
|
+
fig, ax = plt.subplots(
|
|
53
|
+
figsize=figsize,
|
|
54
|
+
layout="constrained",
|
|
55
|
+
subplot_kw={"projection": ccrs.PlateCarree()},
|
|
56
|
+
)
|
|
53
57
|
|
|
54
58
|
# Plot data
|
|
55
59
|
im = plot_data.plot(
|
|
@@ -84,7 +88,7 @@ def plot_spatial_map(
|
|
|
84
88
|
gl.bottom_labels = True
|
|
85
89
|
|
|
86
90
|
# Add colorbar
|
|
87
|
-
cbar =
|
|
91
|
+
cbar = fig.colorbar(im, ax=ax, shrink=0.8, pad=0.02)
|
|
88
92
|
if hasattr(plot_data, "units"):
|
|
89
93
|
cbar.set_label(
|
|
90
94
|
f"{plot_data.name} ({plot_data.units})", rotation=270, labelpad=20
|
|
@@ -100,12 +104,11 @@ def plot_spatial_map(
|
|
|
100
104
|
else:
|
|
101
105
|
title = f"{aggregation.title()} {var_name}"
|
|
102
106
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
plt.tight_layout()
|
|
107
|
+
# Avoid Cartopy's gridliner-based title repositioning producing non-finite bounds.
|
|
108
|
+
ax.set_title(title, fontsize=14, pad=20, y=1.0)
|
|
106
109
|
|
|
107
110
|
if save_path:
|
|
108
|
-
|
|
111
|
+
fig.savefig(save_path, dpi=300, bbox_inches="tight")
|
|
109
112
|
|
|
110
113
|
return fig
|
|
111
114
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|