diff --git a/doc/api/next_api_changes/removals.rst b/doc/api/next_api_changes/removals.rst index 24da01c0e715..a8992ffab7c4 100644 --- a/doc/api/next_api_changes/removals.rst +++ b/doc/api/next_api_changes/removals.rst @@ -73,6 +73,14 @@ Classes and methods - ``scale.NaturalLogTransform`` (use ``scale.LogTransform`` instead) - ``scale.InvertedNaturalLogTransform`` (use ``scale.InvertedLogTransform`` instead) +- ``spines.Spine.is_frame_like()`` (no replacement) + +- ``text.Text.is_math_text()`` (use ``cbook.is_math_text()`` instead) +- ``text.TextWithDash()`` (use ``text.Annotation`` instead) +- ``textpath.TextPath.is_math_text()`` (use ``cbook.is_math_text()`` instead) +- ``textpath.TextPath.text_get_vertices_codes()`` + (use ``textpath.text_to_path.get_text_path()`` instead) + - ``ticker.OldScalarFormatter.pprint_val()`` (no replacement) - ``ticker.ScalarFormatter.pprint_val()`` (no replacement) - ``ticker.LogFormatter.pprint_val()`` (no replacement) @@ -112,8 +120,6 @@ Classes and methods - ``path.get_paths_extents()`` (use ``path.get_path_collection_extents()`` instead) -- ``text.TextWithDash`` (use ``text.Annotation`` instead) - - ``mplot3d.proj3d.line2d()`` (no replacement) - ``mplot3d.proj3d.line2d_dist()`` (no replacement) - ``mplot3d.proj3d.line2d_seg_dist()`` (no replacement) @@ -142,6 +148,8 @@ Classes and methods - ``axisartist.axislines.Axes.AxisDict`` (use ``axis_grid1.mpl_axes.Axes.AxisDict`` instead) +- ``widgets.SpanSelector.buttonDown`` property (no replacement) + Arguments ~~~~~~~~~ - ``Axes.text()`` / ``pyplot.text()`` do not support the parameter ``withdash`` diff --git a/lib/matplotlib/spines.py b/lib/matplotlib/spines.py index f364170bfe80..beb6be6e41e5 100644 --- a/lib/matplotlib/spines.py +++ b/lib/matplotlib/spines.py @@ -240,28 +240,6 @@ def cla(self): if self.axis is not None: self.axis.cla() - @cbook.deprecated("3.1") - def is_frame_like(self): - """Return True if directly on axes frame. - - This is useful for determining if a spine is the edge of an - old style MPL plot. If so, this function will return True. - """ - self._ensure_position_is_set() - position = self._position - if isinstance(position, str): - if position == 'center': - position = ('axes', 0.5) - elif position == 'zero': - position = ('data', 0) - if len(position) != 2: - raise ValueError("position should be 2-tuple") - position_type, amount = position - if position_type == 'outward' and amount == 0: - return True - else: - return False - def _adjust_location(self): """Automatically set spine bounds to the view interval.""" diff --git a/lib/matplotlib/text.py b/lib/matplotlib/text.py index f4e3fc8efcca..f1ff53f8d9f1 100644 --- a/lib/matplotlib/text.py +++ b/lib/matplotlib/text.py @@ -1174,30 +1174,6 @@ def set_text(self, s): self._text = str(s) self.stale = True - @staticmethod - @cbook.deprecated("3.1") - def is_math_text(s, usetex=None): - """ - Returns a cleaned string and a boolean flag. - The flag indicates if the given string *s* contains any mathtext, - determined by counting unescaped dollar signs. If no mathtext - is present, the cleaned string has its dollar signs unescaped. - If usetex is on, the flag always has the value "TeX". - """ - # Did we find an even number of non-escaped dollar signs? - # If so, treat is as math text. - if usetex is None: - usetex = rcParams['text.usetex'] - if usetex: - if s == ' ': - s = r'\ ' - return s, 'TeX' - - if cbook.is_math_text(s): - return s, True - else: - return s.replace(r'\$', '$'), False - def _preprocess_math(self, s): """ Return the string *s* after mathtext preprocessing, and the kind of diff --git a/lib/matplotlib/textpath.py b/lib/matplotlib/textpath.py index 3c4b940624c1..1e0377007e1a 100644 --- a/lib/matplotlib/textpath.py +++ b/lib/matplotlib/textpath.py @@ -453,36 +453,3 @@ def _revalidate_path(self): .translate(*self._xy)) self._cached_vertices = tr.transform(self._vertices) self._invalid = False - - @cbook.deprecated("3.1") - def is_math_text(self, s): - """ - Returns True if the given string *s* contains any mathtext. - """ - # copied from Text.is_math_text -JJL - - # Did we find an even number of non-escaped dollar signs? - # If so, treat is as math text. - dollar_count = s.count(r'$') - s.count(r'\$') - even_dollars = (dollar_count > 0 and dollar_count % 2 == 0) - - if rcParams['text.usetex']: - return s, 'TeX' - - if even_dollars: - return s, True - else: - return s.replace(r'\$', '$'), False - - @cbook.deprecated("3.1", alternative="TextPath") - def text_get_vertices_codes(self, prop, s, usetex): - """ - Convert string *s* to a (vertices, codes) pair using font property - *prop*. - """ - # Mostly copied from backend_svg.py. - if usetex: - return text_to_path.get_text_path(prop, s, usetex=True) - else: - clean_line, ismath = self.is_math_text(s) - return text_to_path.get_text_path(prop, clean_line, ismath=ismath) diff --git a/lib/matplotlib/widgets.py b/lib/matplotlib/widgets.py index 9259dc385541..3c664e11c6d4 100644 --- a/lib/matplotlib/widgets.py +++ b/lib/matplotlib/widgets.py @@ -1821,11 +1821,6 @@ def _release(self, event): self.pressv = None return False - @cbook.deprecated("3.1") - @property - def buttonDown(self): - return False - def _onmove(self, event): """on motion notify event""" if self.pressv is None: