Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 491cce3

Browse files
committed
Deprecate update_datalim_numerix&update_from_data.
There's been a warning on the latter since 2007.
1 parent 45e4a46 commit 491cce3

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,6 +1940,7 @@ def update_datalim(self, xys, updatex=True, updatey=True):
19401940
updatex=updatex, updatey=updatey)
19411941
self.ignore_existing_data_limits = False
19421942

1943+
@cbook.deprecated('2.0', alternative='update_datalim')
19431944
def update_datalim_numerix(self, x, y):
19441945
"""
19451946
Update the data lim bbox with seq of xy tups

lib/matplotlib/transforms.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import weakref
4343
import warnings
4444

45+
from . import cbook
4546
from .path import Path
4647

4748
DEBUG = False
@@ -857,19 +858,19 @@ def __repr__(self):
857858
def ignore(self, value):
858859
"""
859860
Set whether the existing bounds of the box should be ignored
860-
by subsequent calls to :meth:`update_from_data` or
861-
:meth:`update_from_data_xy`.
861+
by subsequent calls to :meth:`update_from_data_xy`.
862862
863863
*value*:
864864
865-
- When True, subsequent calls to :meth:`update_from_data`
865+
- When True, subsequent calls to :meth:`update_from_data_xy`
866866
will ignore the existing bounds of the :class:`Bbox`.
867867
868-
- When False, subsequent calls to :meth:`update_from_data`
868+
- When False, subsequent calls to :meth:`update_from_data_xy`
869869
will include the existing bounds of the :class:`Bbox`.
870870
"""
871871
self._ignore = value
872872

873+
@cbook.deprecated('2.0', alternative='update_from_data_xy')
873874
def update_from_data(self, x, y, ignore=None):
874875
"""
875876
Update the bounds of the :class:`Bbox` based on the passed in

0 commit comments

Comments
 (0)