# Custom ticklabels on colorbar

Hello,

I would like to have some custom ticklabels on a colorbar. In detail, I want the four labels '-\pi', -\pi/2', '0', \pi/2', \pi'. I tried to set manually each text object obtained from cb.ax.get_xticklabels():

t = cb4.ax.get_xticklabels()
for j in t:
j.set_text(r'$\pi$')
j.set_fontsize(10)
j.set_family('serif')

However, no matter what I set for text, it has no effect on the displayed figure.

Another problem is that I want to adjust the fontsize of the colorbar ticklabels on four subplots. This only works for the last two subplots with the syntax shown above. The same syntax has no effect on the first two subplots.

If anybody has some ideas I would be really gald about an answer.