From: <md...@us...> - 2008-10-29 16:43:08
|
Revision: 6346 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6346&view=rev Author: mdboom Date: 2008-10-29 16:43:05 +0000 (Wed, 29 Oct 2008) Log Message: ----------- Minor fixes to text docstrings, and to make getters and setters completely symmetric. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/patches.py trunk/matplotlib/lib/matplotlib/text.py Modified: trunk/matplotlib/lib/matplotlib/patches.py =================================================================== --- trunk/matplotlib/lib/matplotlib/patches.py 2008-10-29 13:51:47 UTC (rev 6345) +++ trunk/matplotlib/lib/matplotlib/patches.py 2008-10-29 16:43:05 UTC (rev 6346) @@ -1383,7 +1383,7 @@ """ Simple square box. - 'pad' :an amount of padding. + *pad*: an amount of padding. """ def __init__(self, pad=0.3): Modified: trunk/matplotlib/lib/matplotlib/text.py =================================================================== --- trunk/matplotlib/lib/matplotlib/text.py 2008-10-29 13:51:47 UTC (rev 6345) +++ trunk/matplotlib/lib/matplotlib/text.py 2008-10-29 16:43:05 UTC (rev 6346) @@ -176,7 +176,6 @@ self._linespacing = linespacing self.update(kwargs) #self.set_bbox(dict(pad=0)) - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd def contains(self,mouseevent): """Test whether the mouse event occurred in the patch. @@ -441,10 +440,14 @@ "Return the color of the text" return self._color - def get_font_properties(self): + def get_fontproperties(self): "Return the :class:`~font_manager.FontProperties` object" return self._fontproperties + def get_font_properties(self): + 'alias for get_fontproperties' + return self.get_fontproperties + def get_family(self): "Return the list of font families used for font lookup" return self._fontproperties.get_family() @@ -687,6 +690,10 @@ """ self._fontproperties.set_variant(variant) + def set_fontvariant(self, variant): + 'alias for set_variant' + return self.set_variant(variant) + def set_name(self, fontname): """alias for set_family""" return self.set_family(fontname) @@ -832,7 +839,12 @@ fp = FontProperties(fp) self._fontproperties = fp.copy() + def set_font_properties(self, fp): + 'alias for set_fontproperties' + self.set_fontproperties(fp) + artist.kwdocd['Text'] = artist.kwdoc(Text) +Text.__init__.im_func.__doc__ = cbook.dedent(Text.__init__.__doc__) % artist.kwdocd class TextWithDash(Text): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |