Skip to content

Commit

Permalink
MNT: Add workaround for CartoPy/Matplotlib incompatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dopplershift committed Sep 28, 2018
1 parent 27704d1 commit bd51daf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/gridding/Natural_Neighbor_Verification.py
Expand Up @@ -76,6 +76,7 @@
tri = Delaunay(pts)

fig, ax = plt.subplots(1, 1, figsize=(15, 10))
ax.ishold = lambda: True # Work-around for Matplotlib 3.0.0 incompatibility
delaunay_plot_2d(tri, ax=ax)

for i, zval in enumerate(zp):
Expand Down
1 change: 1 addition & 0 deletions examples/gridding/Point_Interpolation.py
Expand Up @@ -26,6 +26,7 @@ def basic_map(proj):
fig = plt.figure(figsize=(15, 10))
add_metpy_logo(fig, 0, 80, size='large')
view = fig.add_axes([0, 0, 1, 1], projection=proj)
view._hold = True # Work-around for CartoPy 0.16/Matplotlib 3.0.0 incompatibility
view.set_extent([-120, -70, 20, 50])
view.add_feature(cfeature.STATES.with_scale('50m'))
view.add_feature(cfeature.OCEAN)
Expand Down
1 change: 1 addition & 0 deletions examples/gridding/Wind_SLP_Interpolation.py
Expand Up @@ -89,6 +89,7 @@
fig = plt.figure(figsize=(20, 10))
add_metpy_logo(fig, 360, 120, size='large')
view = fig.add_subplot(1, 1, 1, projection=to_proj)
view._hold = True # Work-around for CartoPy 0.16/Matplotlib 3.0.0 incompatibility

view.set_extent([-120, -70, 20, 50])
view.add_feature(cfeature.STATES.with_scale('50m'))
Expand Down

0 comments on commit bd51daf

Please sign in to comment.