does someone know how to elegantly draw a horizontal colorbar over two of three subplots and one additional horizontal colorbar over the third subplot.
Ideally, the colorbars should have the same x-dimensions as the corresponding image axis. I did not find any nice solution, except setting up an entire image grid using matplotlib.gridspec.
Drawing single colorbars works perfectly fine with mpl_toolkits.axes_grid1.ImageGrid, but it fails when trying to draw a colorbar over two of three axes.
                        
The idea is to use
fig.add_axesto add the axes where the colorbar will be. Here's an example:Edit: The documentation of
fig.add_axessay:So to put the colorbar on top of the graphs you only need to change the
bottomargumen to 1.From
to