Add a `.Line2D` to the Axes; return the line.
(self, line)
| 2449 | self.axes.update_datalim(((xmin, ymin), (xmax, ymax))) |
| 2450 | |
| 2451 | def add_line(self, line): |
| 2452 | """ |
| 2453 | Add a `.Line2D` to the Axes; return the line. |
| 2454 | """ |
| 2455 | _api.check_isinstance(mlines.Line2D, line=line) |
| 2456 | self._set_artist_props(line) |
| 2457 | if line.get_clip_path() is None: |
| 2458 | line.set_clip_path(self.patch) |
| 2459 | |
| 2460 | self._update_line_limits(line) |
| 2461 | if not line.get_label(): |
| 2462 | line.set_label(f'_child{len(self._children)}') |
| 2463 | self._children.append(line) |
| 2464 | line._remove_method = self._children.remove |
| 2465 | self.stale = True |
| 2466 | line._set_in_autoscale(True) |
| 2467 | return line |
| 2468 | |
| 2469 | def _add_text(self, txt): |
| 2470 | """ |