Tick label text

I want to make some mods to a few selected
tick labels.

  For example, if I do

    label = axes.yaxis.get_major_ticks()[2].label

    label.set_fontsize(size)

    label.set_rotation('vertical')

  the font size and the orientation of the tick label is changed.

However, if try

    label.set_text('Foo')

the tick label is *not* modified.

Any clues?

Best regards,

Mads
···
-- +-----------------------------------------------------+
| Mads Ipsen |
+----------------------+------------------------------+
| Gåsebæksvej 7, 4. tv | |
| DK-2500 Valby | phone: +45-29716388 |
| Denmark | email: |
+----------------------+------------------------------+

mads.ipsen@…287…

Mads,

···

On Thu, Jun 28, 2012 at 7:47 AM, Mads Ipsen <madsipsen@…287…> wrote:

  I want to make some mods to a few selected

tick labels.

  For example, if I do



    label = axes.yaxis.get_major_ticks()[2].label

    label.set_fontsize(size)

    label.set_rotation('vertical')



  the font size and the orientation of the tick label is changed.

However, if try

    label.set_text('Foo')



the tick label is *not* modified.



Any clues?



Best regards,



Mads

I can’t seem to reproduce your issue. If I call “label.get_text()” after calling “label.set_text(‘Foo’)”, I get ‘Foo’ back. Did you mean that the text on the plot was not updated? If so, I wouldn’t be totally surprised. Which version of matplotlib (and backend) are you using?

Cheers!
Ben Root