how to I get the label text in the middle of one area/color of the colorbar like in the image bellow?
my code is like this:
cbar = plt.colorbar()
cbar.ax.invert_yaxis()
cbar.ax.set_yticklabels(['A', 'B', 'C'])
how to I get the label text in the middle of one area/color of the colorbar like in the image bellow?
my code is like this:
cbar = plt.colorbar()
cbar.ax.invert_yaxis()
cbar.ax.set_yticklabels(['A', 'B', 'C'])