Re: [Matplotlib-users] tick labels in colorbar?

2010-02-15 Thread Nico Schlömer
Hi, thanks for the suggestion. ax.set_xticks((-pi,pi)) ax.set_xticklabels(('$-\pi$','$\pi$')) I guess color bars are a little special in the sense that AttributeError: Colorbar instance has no attribute 'set_yticklabels' The tick positions are given not by set_yticks either, but as an

Re: [Matplotlib-users] tick labels in colorbar?

2010-02-15 Thread Matthias Michler
On Monday 15 February 2010 09:28:10 Nico Schlömer wrote: Hi, thanks for the suggestion. ax.set_xticks((-pi,pi)) ax.set_xticklabels(('$-\pi$','$\pi$')) I guess color bars are a little special in the sense that AttributeError: Colorbar instance has no attribute 'set_yticklabels' The

Re: [Matplotlib-users] tick labels in colorbar?

2010-02-15 Thread Nico Schlömer
cb.ax.set_yticklabels((r'$-\pi$', '0', r'$\pi$')) Works like a charm. Thanks! --Nico -- SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get

[Matplotlib-users] tick labels in colorbar?

2010-02-14 Thread Nico Schlömer
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 -- SOLARIS 10 is the OS

Re: [Matplotlib-users] tick labels in colorbar?

2010-02-14 Thread Philipp Bender
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