From 33d1766af828b2209120600676dfa4de9c7aac1a Mon Sep 17 00:00:00 2001 From: AS <aaron.spring@mpimet.mpg.de> Date: Wed, 17 Jun 2020 10:34:55 +0200 Subject: [PATCH] more plotting stuff minor changes --- pymistral/plot.py | 11 +---------- pymistral/tests/test_plot.py | 4 +++- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/pymistral/plot.py b/pymistral/plot.py index 8b90ea1..575d950 100644 --- a/pymistral/plot.py +++ b/pymistral/plot.py @@ -159,15 +159,6 @@ class CartopyMap(object): else: if round: ax.set_boundary(circle, transform=ax.transAxes) - max_lat = 30 - if isinstance(proj, ccrs.NorthPolarStereo): - ax.set_extent( - [-180, 180, max_lat, 90], crs=ccrs.PlateCarree() - ) - elif isinstance(proj, ccrs.SouthPolarStereo): - ax.set_extent( - [-180, 180, -90, -max_lat], crs=ccrs.PlateCarree() - ) axm = getattr(xda.plot, plot_type)( lon, lat, ax=ax, transform=ccrs.PlateCarree(), **kwargs ) @@ -184,7 +175,7 @@ class CartopyMap(object): zorder=100, edgecolor='k', ) - print(draw_labels, draw_lon_lat_labels, round, proj) + if draw_lon_lat_labels: _set_lon_lat_axis(axes, proj) else: diff --git a/pymistral/tests/test_plot.py b/pymistral/tests/test_plot.py index 2e94ca2..5c66b49 100644 --- a/pymistral/tests/test_plot.py +++ b/pymistral/tests/test_plot.py @@ -60,7 +60,9 @@ def test_plot_map_projstr(da, projstr): pytest.lazy_fixture('air_temperature_da'), ], ) -@pytest.mark.parametrize('projstr', ['NorthPolarStereo','SouthPolarStereo','Stereographic']) +@pytest.mark.parametrize( + 'projstr', ['NorthPolarStereo', 'SouthPolarStereo', 'Stereographic'] +) def test_plot_map_stereo(da, projstr): proj = eval(f'ccrs.{projstr}()') fig, ax = plt.subplots(subplot_kw={'projection': proj}) -- GitLab