We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60c4ce6 commit 560c9a8Copy full SHA for 560c9a8
pandas/plotting/_matplotlib/core.py
@@ -1560,11 +1560,10 @@ def _make_plot(self, fig: Figure) -> None:
1560
self._append_legend_handles_labels(newlines[0], label)
1561
1562
if self._is_ts_plot():
1563
- # reset of xlim should be used for ts data
1564
- # TODO: GH28021, should find a way to change view limit on xaxis
1565
lines = get_all_lines(ax)
1566
left, right = get_xlim(lines)
1567
- ax.set_xlim(left, right)
+ padding = (right - left) * 0.05
+ ax.set_xlim(left - padding, right + padding)
1568
1569
# error: Signature of "_plot" incompatible with supertype "MPLPlot"
1570
@classmethod
0 commit comments