I'd like to get two colourbars in one plot, with a map. Unfortunately, the colourbars are as big as the plot themselves. Even using shrink in the colourbar code, it only shrinks the colourbars, but not the size that they take up.
IS there a simple way to use more space for my plot, and less space for the colourbars? And is there an easy way to get the colourbars to appear side by side at the bottom also?
Code is below
plt.clf()
my_cmap = cm.get_cmap('YlOrRd')
cs = map.contourf(x,y,bj,levels = Y,cmap=my_cmap,locator=mpl.ticker.LogLocator())
norm = mpl.colors.BoundaryNorm(bounds, my_cmap.N)
cb1 = plt.colorbar(cmap=my_cmap,
norm=norm,
boundaries=bounds,
extend='both',
orientation="horizontal",
ticks=bounds,
shrink = 0.35)
cb1.set_label('Increase in Black Carbon')
bj = -bj
ymap = cm.get_cmap('PuBu')
cs = map.contourf(x,y,bj,levels = Y,cmap=ymap,locator=mpl.ticker.LogLocator())
# set colourbar with location and size, with labels.
norm = mpl.colors.BoundaryNorm(bounds,ymap.N)
cb2 = plt.colorbar(cmap=my_cmap,
norm=norm,
boundaries=bounds,
extend='both',
orientation="horizontal",
ticks=bounds,
shrink=0.35)
cb2.set_label('Decrease in Black Carbon')
font = {'family' : 'serif',
'color' : 'black',
'weight' : 'bold',
'size' : 21,
}
#add plot details
plt.title(r'Black Carbon surface concentrations changes in %s 2006 compared with %s 2006 ($\mu$gm$\^3$)'%(g,d) ,fontdict=font)
map.drawcoastlines(linewidth=0.75)
map.drawcountries(linewidth=0.25)
#show plot
plt.show()