title = 'Surface Downward Shortwave Radiation [W m-2]\n01/01/2000'
jmax, imax = 3, 2
fig_height, fig_width = 9, 12
fs_suptitle = 20
fs_title = 16
fs_graticule = 12
fs_cbar = 16
vmin, vmax = 0, 1200
cmap = plt.cm.jet
ticks = range(0,1201,200)
ticklabels = ticks
cnorm = np.linspace(vmin,vmax,1000)
cnorml = colors.BoundaryNorm(cnorm,256)
dat_dummy = np.array([[vmin],[vmax]])
fig = plt.figure(figsize=(fig_width,fig_height))
fig.suptitle(title,fontsize=fs_suptitle)
t = 0
for j in range(jmax):
for i in range(imax):
t += 1
ax = fig.add_subplot(jmax,imax,t)
ax.set_title('t = {}'.format((t-1)*3,fontsize=fs_title))
labels_l = [i==0,i==imax-1,False,False]
labels_b = [False,False,False,j==jmax-1]
m = Basemap(ax=ax,llcrnrlon=-180,urcrnrlon=180,area_thresh=10000)
m.drawparallels(np.arange( -90, 91,30),linewidth=0.3,color='silver',
labels=labels_l,fontsize=fs_graticule)
m.drawmeridians(np.arange(-180,180,60),linewidth=0.3,color='silver',
labels=labels_b,fontsize=fs_graticule)
m.drawmeridians(np.arange(-180,180,30),linewidth=0.3,color='silver',
labels=[0,0,0,0],fontsize=fs_graticule)
m.drawcoastlines(linewidth=0.2,color='w')
img = m.imshow(dat[(t-1)*3,:,:]),cmap=cmap,norm=cnorml,interpolation='nearest')
ax = fig.add_axes([0.1,0,0.8,0.4])
ax.patch.set_facecolor('None')
for loc in ['left','right','top','bottom']:
ax.spines[loc].set_visible(False)
ax.tick_params(axis='x',top='off',bottom='off',labelbottom='off')
ax.tick_params(axis='y',left='off',right='off',labelleft='off')
norm = colors.Normalize(vmin=vmin,vmax=vmax)
mappable = ScalarMappable(cmap=cmap,norm=norm)
mappable._A = []
cb = fig.colorbar(mappable,ax=ax,aspect=50,pad=0.08,
shrink=0.8,orientation='horizontal')
cb.ax.tick_params(labelsize=fs_cbar)
cb.set_ticks(ticks)
cb.set_ticklabels(ticklabels)
plt.show()