Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9db0358

Browse files
author
Andrew Dawson
committed
BF - correct return type for Axes.get_title
1 parent e2c092a commit 9db0358

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/axes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3171,8 +3171,8 @@ def get_title(self, loc="center"):
31713171
31723172
Returns
31733173
-------
3174-
text : :class:`~matplotlib.text.Text`
3175-
The matplotlib text instance representing the title
3174+
title: str
3175+
The title text string.
31763176
31773177
"""
31783178
try:
@@ -3181,7 +3181,7 @@ def get_title(self, loc="center"):
31813181
'right': self._right_title}[loc.lower()]
31823182
except KeyError:
31833183
raise ValueError("'%s' is not a valid location" % loc)
3184-
return title
3184+
return title.get_text()
31853185

31863186
@docstring.dedent_interpd
31873187
def set_title(self, label, loc="center", fontdict=None, **kwargs):

0 commit comments

Comments
 (0)