Skip to content
Snippets Groups Projects
Commit 7deaf924 authored by Nils Brüggemann's avatar Nils Brüggemann Committed by Fraser William Goldsworth
Browse files

pyicon_plotting.py / plot_settings: Only change cartopy axes ticks if...

pyicon_plotting.py / plot_settings: Only change cartopy axes ticks if rectangular axes (and not for Stereo projections).
parent e5b20aa2
No related branches found
No related tags found
1 merge request!42Draft: cartopy projections
......@@ -1604,8 +1604,9 @@ def plot_settings(ax, xlim='none', ylim='none', xticks='auto', yticks='auto', #x
# major ticks need to be set before minor ticks are set
#ax.xaxis.set_major_formatter(cartopy.mpl.ticker.LongitudeFormatter(degree_symbol=''))
#ax.yaxis.set_major_formatter(cartopy.mpl.ticker.LatitudeFormatter(degree_symbol=''))
ax.xaxis.set_major_formatter(cartopy.mpl.ticker.LongitudeFormatter())
ax.yaxis.set_major_formatter(cartopy.mpl.ticker.LatitudeFormatter())
if isinstance(ax.projection, (ccrs._RectangularProjection, ccrs.Mercator)):
ax.xaxis.set_major_formatter(cartopy.mpl.ticker.LongitudeFormatter())
ax.yaxis.set_major_formatter(cartopy.mpl.ticker.LatitudeFormatter())
if proj_name in ['PlateCarree']: # settings which only work for certain projections
if do_xyticks:
ax.set_xticks(xticks, crs=ccrs.PlateCarree())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment