cbar = plt.colorbar() cbar.ax.set_yticklabels(['0','1','2','>3']) cbar.set_label('Numbers', rotation=270)