From: John H. <jdh...@ac...> - 2006-03-30 05:38:57
|
>>>>> "Jouni" == Jouni K Seppanen <jk...@ik...> writes: Jouni> Darren Dale <dd...@co...> writes: >>> > OK, I refactored TextWithDash, and my changes passed >>> backend_driver.py. > setp(axes().get_yticklabels()) gives a >>> comprehensive list as of svn 2206. >> I fixed the bug John pointed out, and unmasked the refactored >> version of TextWithDash in svn 2226. Jouni> Yes, 'size' is listed in the output now. However, now it Jouni> seems that there are too many things listed: Jouni> label: any string Jouni> text: string If I'm reading this right, this has nothing to do with Darren's recent refactoring. 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 plot(x1, y1, 'go', label='label x') plot(x1, y1, 'rs', label='label y') legend() and legend will "to the right thing"(TM) In other cases, we might use the label in outputting group information in SVG output for instance, where we have open and close tags associated with polygons, etc.. So the label is not necessarily rendered into the figure, although it might be as the legend example illustrates, but is useful to tag objects with strings. matplotlib.text.Text.set_text, however, does set the to-be-rendered string for the Text instance. It is right and good that the text instance has a separate label and text property, though I agree this might be confusing on a cursory 'setp' or 'getp' introspection. JDH |