def plot_map(lon, lat, RR, bbox, mfile, mres=1): fig1 = plt.figure() ax = fig1.add_subplot(111) m = viz.make_proj_stere(bbox) m = viz.plot_grid_proj(m, lon, lat, RR, contourf=False, shift=True) plt.colorbar(orientation='vertical', shrink=.7) x, y, mask = viz.get_gtif_subreg(m, mfile, mres) mask = np.ma.masked_values(mask, 4) m.imshow(mask, zorder=1, cmap=plt.cm.gray_r) #m = plot_boundaries(m, (lon.min(),lon.max(),lat.min()-10,lat.max()+3)) p_ = m.drawparallels(np.arange(-90.,-70.,3), labels=[0,0,1,0], color='0.6') m_ = m.drawmeridians(np.arange(-80.,-20.,5), labels=[1,0,0,0], color='0.6') return fig1
def plot_map(lon, lat, grid, bbox, mfile, mres=1, **kw): fig1 = plt.figure() ax = fig1.add_subplot(111) m = viz.make_proj_stere(bbox) m = viz.plot_grid_proj(m, lon, lat, grid, contourf=False, shift=True, **kw) #plt.colorbar(orientation='vertical', shrink=.7) #x, y, mask = viz.get_gtif_subreg(m, mfile, mres) #mask = np.ma.masked_values(mask, 4) #m.imshow(mask, zorder=0, cmap=plt.cm.gray_r) #m = plot_boundaries(m, (lon.min(),lon.max(),lat.min()-10,lat.max()+3)) #p_ = m.drawparallels(np.arange(-90.,-70.,3), labels=[0,0,0,1], color='0.6') #m_ = m.drawmeridians(np.arange(-80.,-20.,5), labels=[1,0,0,0], color='0.6') #viz.colorbar(fig1, CMAP, (-ABS_VAL,ABS_VAL)) return fig1
def plot_map(lon, lat, grid, bbox, mfile, mres=1, **kw): """ **kw : keyword args contourf=[True/False] vmin=int vmax=int """ fig1 = plt.figure() ax = fig1.add_subplot(111) m = viz.make_proj_stere(bbox) m = viz.plot_grid_proj(m, lon, lat, grid, shift=True, **kw) plt.colorbar(orientation='vertical', shrink=.65) x, y, mask = viz.get_gtif_subreg(m, mfile, mres) mask = np.ma.masked_values(mask, 4) m.imshow(mask, zorder=1, cmap=plt.cm.gray_r) #m = plot_boundaries(m, (lon.min(),lon.max(),lat.min()-10,lat.max()+3)) p_ = m.drawparallels(np.arange(-90.,-60,3), labels=[0,0,0,1], color='0.2') m_ = m.drawmeridians(np.arange(-180,180.,5), labels=[1,0,0,0], color='0.2') return fig1
def plot_map(lon, lat, grid, bbox, mfile, mres=1, **kw): """ **kw : keyword args contourf=[True/False] vmin=int vmax=int """ fig1 = plt.figure() ax = fig1.add_subplot(111) m = viz.make_proj_stere(bbox) m = viz.plot_grid_proj(m, lon, lat, grid, shift=True, **kw) plt.colorbar(orientation='vertical', shrink=.65) x, y, mask = viz.get_gtif_subreg(m, mfile, mres) mask = np.ma.masked_values(mask, 4) m.imshow(mask, zorder=1, cmap=plt.cm.gray_r) #m = plot_boundaries(m, (lon.min(),lon.max(),lat.min()-10,lat.max()+3)) p_ = m.drawparallels(np.arange(-90., -60, 3), labels=[0, 0, 0, 1], color='0.2') m_ = m.drawmeridians(np.arange(-180, 180., 5), labels=[1, 0, 0, 0], color='0.2') return fig1