Skip to content

Commit cfa859e

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 3d3c930 commit cfa859e

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
@@ -110,3 +110,8 @@ them.
110110
``args_key`` and ``exec_key`` attributes of builtin `.MovieWriter`\s
111111
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112112
These attributes are deprecated.
113+
114+
``Axes.update_datalim_bounds``
115+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
116+
This method is deprecated. Use
117+
``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)