Add a `.Patch` to the Axes; return the patch.
(self, p)
| 2539 | self.ignore_existing_data_limits = False |
| 2540 | |
| 2541 | def add_patch(self, p): |
| 2542 | """ |
| 2543 | Add a `.Patch` to the Axes; return the patch. |
| 2544 | """ |
| 2545 | _api.check_isinstance(mpatches.Patch, p=p) |
| 2546 | self._set_artist_props(p) |
| 2547 | if p.get_clip_path() is None: |
| 2548 | p.set_clip_path(self.patch) |
| 2549 | self._update_patch_limits(p) |
| 2550 | self._children.append(p) |
| 2551 | p._remove_method = self._children.remove |
| 2552 | p._set_in_autoscale(True) |
| 2553 | return p |
| 2554 | |
| 2555 | def _update_patch_limits(self, patch): |
| 2556 | """Update the data limits for the given patch.""" |