|
26 | 26 |
|
27 | 27 | from matplotlib.axes import Axes |
28 | 28 | from matplotlib.axis import Tick |
| 29 | + from matplotlib.lines import Line2D |
29 | 30 | from matplotlib.patches import Rectangle |
30 | 31 | from matplotlib.transforms import Transform |
31 | 32 |
|
@@ -97,6 +98,7 @@ def get(name: str) -> Any: |
97 | 98 | self.plot_footer_background: Rectangle | None = get( |
98 | 99 | "plot_footer_background" |
99 | 100 | ) |
| 101 | + self.plot_footer_line: Line2D | None = get("plot_footer_line") |
100 | 102 |
|
101 | 103 | def _is_blank(self, name: str) -> bool: |
102 | 104 | return self.plot.theme.T.is_blank(name) |
@@ -385,6 +387,7 @@ def _move_artists(self, spaces: PlotSideSpaces): |
385 | 387 | self.plot_footer, ha, plot_footer_position |
386 | 388 | ) |
387 | 389 | self._resize_plot_footer_background(spaces) |
| 390 | + self._resize_plot_footer_line(spaces) |
388 | 391 |
|
389 | 392 | if self.axis_title_x: |
390 | 393 | ha = theme.getp(("axis_title_x", "ha"), "center") |
@@ -532,6 +535,19 @@ def _resize_plot_footer_background(self, spaces: PlotSideSpaces): |
532 | 535 | self.plot_footer_background.set_height(spaces.b.footer_height) |
533 | 536 | self.plot_footer_background.set_width(spaces.plot_width) |
534 | 537 |
|
| 538 | + def _resize_plot_footer_line(self, spaces: PlotSideSpaces): |
| 539 | + """ |
| 540 | + Resize the footer line to be a border above the footer |
| 541 | + """ |
| 542 | + if not self.plot_footer_line: |
| 543 | + return |
| 544 | + |
| 545 | + x1 = spaces.l.offset |
| 546 | + x2 = x1 + spaces.plot_width |
| 547 | + y1 = y2 = spaces.b.offset + spaces.b.footer_height |
| 548 | + self.plot_footer_line.set_xdata([x1, x2]) |
| 549 | + self.plot_footer_line.set_ydata([y1, y2]) |
| 550 | + |
535 | 551 |
|
536 | 552 | def _text_is_visible(text: Text) -> bool: |
537 | 553 | """ |
|
0 commit comments