File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,9 @@ def get_rotation(rotation):
93
93
animated [True | False]
94
94
backgroundcolor any matplotlib color
95
95
bbox rectangle prop dict plus key 'pad' which is a
96
- pad in points; if a boxstyle is supplied, then
97
- pad is instead a fraction of the font size
96
+ pad in points; if a boxstyle is supplied as
97
+ a string, then pad is instead a fraction
98
+ of the font size
98
99
clip_box a matplotlib.transform.Bbox instance
99
100
clip_on [True | False]
100
101
color any matplotlib color
@@ -498,7 +499,9 @@ def set_bbox(self, rectprops):
498
499
else :
499
500
if pad is None :
500
501
pad = 0.3
501
- if "pad" not in boxstyle :
502
+
503
+ # boxstyle could be a callable or a string
504
+ if is_string_like (boxstyle ) and "pad" not in boxstyle :
502
505
boxstyle += ",pad=%0.2f" % pad
503
506
504
507
bbox_transmuter = props .pop ("bbox_transmuter" , None )
You can’t perform that action at this time.
0 commit comments