Skip to content

Commit 0013334

Browse files
committed
Deprecate update_datalim_bounds.
This method was introduced in 56d43e6 with a note that it would be more efficient to use it in some cases, then the note went away in ad74c3f (2008) without the method ever being used either before or after. In any case, it is simple enough to be reimplemented (possibly inline) if we really need it.
1 parent 8f33959 commit 0013334

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

doc/api/next_api_changes/deprecations.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,8 @@ Revert deprecation \*min, \*max keyword arguments to ``set_x/y/zlim_3d()``
7373
These keyword arguments were deprecated in 3.0, alongside with the respective
7474
parameters in ``set_xlim()`` / ``set_ylim()``. The deprecations of the 2D
7575
versions were already reverted in in 3.1.
76+
77+
``Axes.update_datalim_bounds``
78+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
79+
This method is deprecated. Use
80+
``ax.dataLim.set(Bbox.union([ax.dataLim, bounds]))`` instead.

lib/matplotlib/axes/_base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2099,6 +2099,8 @@ def update_datalim(self, xys, updatex=True, updatey=True):
20992099
updatex=updatex, updatey=updatey)
21002100
self.ignore_existing_data_limits = False
21012101

2102+
@cbook.deprecated(
2103+
"3.3", alternative="ax.dataLim.set(Bbox.union([ax.dataLim, bounds]))")
21022104
def update_datalim_bounds(self, bounds):
21032105
"""
21042106
Extend the `~.Axes.datalim` Bbox to include the given

0 commit comments

Comments
 (0)