tick labels in colorbar?

Hi,

I'm plotting a colorbar with

    pylab.colorbar(ticks=(-pi,0,pi))

and trying to add proper "\pi" labels to it. Couldn't find out how to
do that from the manual -- any hints here?

Cheers,
Nico

Hi Nico,

I didn't test it, but maybe with something like that:

rc('text', usetex=True)

[taken from
http://matplotlib.sourceforge.net/plot_directive/mpl_examples/pylab_examples/tex_demo.py]

ax.set_xticks((-pi,pi))
ax.set_xticklabels(('$-\pi$','$\pi$'))

[taken from
http://matplotlib.sourceforge.net/examples/pylab_examples/integral_demo.html]

Cheers,
Philipp