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

Method set_label

lib/matplotlib/artist.py:1166–1179  ·  view source on GitHub ↗

Set a label that will be displayed in the legend. Parameters ---------- s : object *s* will be converted to a string by calling `str`.

(self, s)

Source from the content-addressed store, hash-verified

1164 return self._label
1165
1166 def set_label(self, s):
1167 """
1168 Set a label that will be displayed in the legend.
1169
1170 Parameters
1171 ----------
1172 s : object
1173 *s* will be converted to a string by calling `str`.
1174 """
1175 label = str(s) if s is not None else None
1176 if label != self._label:
1177 self._label = label
1178 self.pchanged()
1179 self.stale = True
1180
1181 def get_zorder(self):
1182 """Return the artist's zorder."""

Callers

nothing calls this directly

Calls 1

pchangedMethod · 0.95

Tested by

no test coverage detected