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

Method __repr__

lib/matplotlib/axes/_base.py:825–840  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

823 self._stale = True
824
825 def __repr__(self):
826 fields = []
827 if self.get_label():
828 fields += [f"label={self.get_label()!r}"]
829 if hasattr(self, "get_title"):
830 titles = {}
831 for k in ["left", "center", "right"]:
832 title = self.get_title(loc=k)
833 if title:
834 titles[k] = title
835 if titles:
836 fields += [f"title={titles}"]
837 for name, axis in self._axis_map.items():
838 if axis.label and axis.label.get_text():
839 fields += [f"{name}label={axis.label.get_text()!r}"]
840 return f"<{self.__class__.__name__}: " + ", ".join(fields) + ">"
841
842 def get_subplotspec(self):
843 """Return the `.SubplotSpec` associated with the subplot, or None."""

Callers

nothing calls this directly

Calls 4

joinMethod · 0.80
get_labelMethod · 0.45
get_titleMethod · 0.45
get_textMethod · 0.45

Tested by

no test coverage detected