Skip to content

Commit c3534ea

Browse files
committed
2 parents c550b12 + 9a6844f commit c3534ea

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

acme_diags/plot/cartopy/polar_plot.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ def plot_panel(n, fig, proj, pole, var, clevels,
6565
ax.set_extent([-180, 180, -55, -90], crs=ccrs.PlateCarree())
6666

6767
cmap = get_colormap(cmap, parameters)
68+
69+
theta = np.linspace(0, 2 * np.pi, 100)
70+
center, radius = [0.5, 0.5], 0.5
71+
verts = np.vstack([np.sin(theta), np.cos(theta)]).T
72+
circle = mpath.Path(verts * radius + center)
73+
ax.set_boundary(circle, transform=ax.transAxes)
74+
6875
p1 = ax.contourf(lon, lat, var,
6976
transform=ccrs.PlateCarree(),
7077
norm=norm,
@@ -75,12 +82,6 @@ def plot_panel(n, fig, proj, pole, var, clevels,
7582
ax.set_aspect('auto')
7683
ax.coastlines(lw=0.3)
7784

78-
theta = np.linspace(0, 2 * np.pi, 100)
79-
center, radius = [0.5, 0.5], 0.5
80-
verts = np.vstack([np.sin(theta), np.cos(theta)]).T
81-
circle = mpath.Path(verts * radius + center)
82-
#ax.set_boundary(circle, transform=ax.transAxes)
83-
8485
# Plot titles
8586
for i in range(3):
8687
if title[i] is None:

0 commit comments

Comments
 (0)