File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Commands that pass an argument to the Text constructor or to
2+ Text.set_text() now accept any object that can be converted
3+ with '%s'. This affects xlabel(), title(), etc.
4+
15 Barh now takes a **kwargs dict instead of most of the old
26 arguments. This helps ensure that bar and barh are kept in sync,
37 but as a side effect you can no longer pass e.g. color as a
48 positional argument.
59
610 ft2font.get_charmap() now returns a dict that maps character codes
711 to glyph indices (until now it was reversed)
8-
12+
913 Moved data files into lib/matplotlib so that setuptools' develop
1014 mode works. Re-organized the mpl-data layout so that this source
1115 structure is maintained in the installation. (I.e. the 'fonts' and
Original file line number Diff line number Diff line change 1+ 2007-03-17 Text.set_text() accepts anything convertible with '%s' - EF
2+
132007-03-14 Add masked-array support to hist. - EF
24
352007-03-03 Change barh to take a kwargs dict and pass it to bar.
Original file line number Diff line number Diff line change @@ -143,8 +143,6 @@ def __init__(self,
143143 """
144144
145145 Artist .__init__ (self )
146- if not is_string_like (text ):
147- raise TypeError ('text must be a string type' )
148146 self .cached = maxdict (5 )
149147 self ._x , self ._y = x , y
150148
@@ -729,11 +727,9 @@ def set_text(self, s):
729727 """
730728 Set the text string s
731729
732- ACCEPTS: string
730+ ACCEPTS: string or anything printable with '%s' conversion
733731 """
734- if not is_string_like (s ):
735- raise TypeError ("This doesn't look like a string: '%s'" % s )
736- self ._text = s
732+ self ._text = '%s' % (s ,)
737733 #self._substrings = scanner(s) # support embedded mathtext
738734 self ._substrings = [] # ignore embedded mathtext for now
739735
You can’t perform that action at this time.
0 commit comments