diff --git a/doc/api/next_api_changes/deprecations.rst b/doc/api/next_api_changes/deprecations.rst index 60c0682affc1..23fe738b61c3 100644 --- a/doc/api/next_api_changes/deprecations.rst +++ b/doc/api/next_api_changes/deprecations.rst @@ -119,3 +119,8 @@ The following parameters do not have any effect and are deprecated: - parameter *quantize* of `.Path.cleaned()` - parameter *s* of `.AnnotationBbox.get_fontsize()` - parameter *label* of `.Tick` + +``Axes.update_datalim_bounds`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This method is deprecated. Use +``ax.dataLim.set(Bbox.union([ax.dataLim, bounds]))`` instead. diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py index 5f98cbe2a116..192121134058 100644 --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -2099,6 +2099,8 @@ def update_datalim(self, xys, updatex=True, updatey=True): updatex=updatex, updatey=updatey) self.ignore_existing_data_limits = False + @cbook.deprecated( + "3.3", alternative="ax.dataLim.set(Bbox.union([ax.dataLim, bounds]))") def update_datalim_bounds(self, bounds): """ Extend the `~.Axes.datalim` Bbox to include the given