From: Jouni K S. <jk...@ik...> - 2006-03-30 08:45:12
|
John Hunter <jdh...@ac...> writes: > Jouni> label: any string > Jouni> text: string > > a 'label' is a property of any matplotlib.artist.Artist (the base > class for Line2D, Patch, Text, etc), and is used to attach a string to > any object that renders into a figure (including the Figure itself). > This is most used for auto-legending Oh, of course. I was confused by the name "tick labels" for the text that accompanies tick marks. > matplotlib.text.Text.set_text, however, does set the to-be-rendered > string for the Text instance. It doesn't seem to work for tick labels. E.g. gca().get_xticklabels()[0].set_text('foo') has no effect. This is quite understandable, since the text comes from a Formatter object. It might be a neat hack to have set_text('foo') automatically call set_xticklabels(['foo',...]). -- Jouni |