Given the following code:
imshow(np.arange(16*16).reshape(16,16)) cb = colorbar() cb.set_label(\"Foo\") cb.set_ticks([0,255])
Which produces:>
cb.set_label("Foo", labelpad=-1)
Negative labelpad values will move closer to the bar, positive away.