|
From: Scott S. <sco...@gm...> - 2010-01-20 13:55:35
|
>2010/1/20 Mario Mech <me...@me...>:
> cb = pyplot.colorbar(format=r"%2.1f")
> for j in cb.ax.get_yticklabels():
> j.set_text('bla')
> pyplot.show()
>
> Doesn't do anything.
It looks like cb.ax.get_yticklabels() returns a list of copies of the
Text objects. Since you are only changing the copies it has no effect
on your figure.
You'll need to use cb.ax.set_yticklabels() and pass a list of strings
to use as tick labels. See
http://matplotlib.sourceforge.net/examples/pylab_examples/colorbar_tick_labelling_demo.html
for an example.
Cheers,
Scott
|