| 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.""" |