MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / get_title

Method get_title

lib/matplotlib/axes/_axes.py:113–136  ·  view source on GitHub ↗

Get an Axes title. Get one of the three available Axes titles. The available titles are positioned above the Axes in the center, flush with the left edge, and flush with the right edge. Parameters ---------- loc : {'center', 'left', 'right'}

(self, loc="center")

Source from the content-addressed store, hash-verified

111 ### Labelling, legend and texts
112
113 def get_title(self, loc="center"):
114 """
115 Get an Axes title.
116
117 Get one of the three available Axes titles. The available titles
118 are positioned above the Axes in the center, flush with the left
119 edge, and flush with the right edge.
120
121 Parameters
122 ----------
123 loc : {'center', 'left', 'right'}, str, default: 'center'
124 Which title to return.
125
126 Returns
127 -------
128 str
129 The title text string.
130
131 """
132 titles = {'left': self._left_title,
133 'center': self.title,
134 'right': self._right_title}
135 title = _api.getitem_checked(titles, loc=loc.lower())
136 return title.get_text()
137
138 def set_title(self, label, fontdict=None, loc=None, pad=None, *, y=None,
139 **kwargs):

Callers 7

get_window_titleMethod · 0.45
edit_parametersMethod · 0.45
figure_editFunction · 0.45
__repr__Method · 0.45
test_legend_title_emptyFunction · 0.45

Calls 1

get_textMethod · 0.45

Tested by 3

test_legend_title_emptyFunction · 0.36