Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def plotMap():
- proj = ccrs.Mercator(central_longitude=180, min_latitude=15,
- max_latitude=55)
- fig, ax = plt.subplots(subplot_kw=dict(projection=proj), figsize=(12,12))
- ax.set_extent([255 ,115, 0, 60], crs=ccrs.PlateCarree())
- ax.add_feature(cfeature.LAND, facecolor='0.3')
- ax.add_feature(cfeature.LAKES, alpha=0.9)
- ax.add_feature(cfeature.BORDERS, zorder=10)
- ax.add_feature(cfeature.COASTLINE, zorder=10)
- #(http://www.naturalearthdata.com/features/)
- states_provinces = cfeature.NaturalEarthFeature(
- category='cultural', name='admin_1_states_provinces_lines',
- scale='50m', facecolor='none')
- ax.add_feature(states_provinces, edgecolor='black', zorder=10)
- #ax.gridlines(xlocs=grids_ma, ylocs=np.arange(-80,90,20), zorder=21,
- draw_labels=True )
- ax.gridlines(crs=ccrs.PlateCarree(), linewidth=2, color='black',
- draw_labels=True, alpha=0.5, linestyle='--')
- ax.xlabels_top = False
- ax.ylabels_left = False
- ax.ylabels_right=True
- ax.xlines = True
- ax.xlocator = mticker.FixedLocator([-160, -140, -120, 120, 140, 160, 180,])
- ax.xformatter = LONGITUDE_FORMATTER
- ax.yformatter = LATITUDE_FORMATTER
- ax.xlabel_style = {'size': 15, 'color': 'gray'}
- ax.xlabel_style = {'color': 'red', 'weight': 'bold'}
- return fig, ax
Add Comment
Please, Sign In to add comment