8000 FIX: doc string · matplotlib/matplotlib@cf25a70 · GitHub
[go: up one dir, main page]

Skip to content

Commit cf25a70

Browse files
committed
FIX: doc string
1 parent b710201 commit cf25a70

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

lib/matplotlib/figure.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -458,26 +458,29 @@ def suptitle(self, t, **kwargs):
458458
'ha': 'center', 'va': 'top', 'rotation': 0}
459459
return self._suplabels(t, info, **kwargs)
460460

461-
suptitle.__doc__ = _suplabels.__doc__.format(
462-
x0=0.5, y0=0.98, name='suptitle', ha='center', va='top')
461+
if suptitle.__doc__:
462+
suptitle.__doc__ = _suplabels.__doc__.format(
463+
x0=0.5, y0=0.98, name='suptitle', ha='center', va='top')
463464

464465
def supxlabel(self, t, **kwargs):
465466
# docstring from _suplabels...
466467
info = {'name': '_supxlabel', 'x0': 0.5, 'y0': 0.01,
467468
'ha': 'center', 'va': 'bottom', 'rotation': 0}
468469
return self._suplabels(t, info, **kwargs)
469470

470-
supxlabel.__doc__ = _suplabels.__doc__.format(
471-
x0=0.5, y0=0.01, name='supxlabel', ha='center', va='bottom')
471+
if supxlabel.__doc__:
472+
supxlabel.__doc__ = _suplabels.__doc__.format(
473+
x0=0.5, y0=0.01, name='supxlabel', ha='center', va='bottom')
472474

473475
def supylabel(self, t, **kwargs):
474476
# docstring from _suplabels...
475477
info = {'name': '_supylabel', 'x0': 0.02, 'y0': 0.5,
476478
'ha': 'left', 'va': 'center', 'rotation': 90}
477479
return self._suplabels(t, info, **kwargs)
478480

479-
supylabel.__doc__ = _suplabels.__doc__.format(
480-
x0=0.02, y0=0.5, name='supylabel', ha='left', va='center')
481+
if supylabel.__doc__:
482+
supylabel.__doc__ = _suplabels.__doc__.format(
483+
x0=0.02, y0=0.5, name='supylabel', ha='left', va='center')
481484

482485
def get_edgecolor(self):
483486
"""Get the edge color of the Figure rectangle."""

0 commit comments

Comments
 (0)
0