Skip to content

Commit 2b2fa46

Browse files
committed
Merge pull request matplotlib#1832 from ajdawson/fix-get-title
BF - correct return type for Axes.get_title
2 parents e2c092a + 9db0358 commit 2b2fa46

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)