Code removal by tacaswell · Pull Request #3992 · matplotlib/matplotlib · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
76 changes: 75 additions & 1 deletion doc/api/api_changes/code_removal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,78 @@ Code Removal

Legend
------
Removed handling of `loc` as a positional argument to `Legend`
- Removed handling of `loc` as a positional argument to `Legend`


Legend handlers
~~~~~~~~~~~~~~~
Remove code to allow legend handlers to be callable. They must now
implement a method ``legend_artist``.


Axis
----
Removed method ``set_scale``. This is now handled via a private method which
should not be used directly by users. It is called via ``Axes.set_{x,y}scale``
which takes care of ensuring the coupled changes are also made to the Axes object.

finance.py
----------
Removed functions with ambiguous argument order from finance.py


Annotation
----------
Removed ``textcoords`` and ``xytext`` proprieties from Annotation objects.


spinxext.ipython_*.py
---------------------
Both ``ipython_console_highlighting`` and ``ipython_directive`` have been moved to
`IPython`.

Change your import from 'matplotlib.sphinxext.ipython_directive' to
'IPython.sphinxext.ipython_directive' and from 'matplotlib.sphinxext.ipython_directive' to
'IPython.sphinxext.ipython_directive'


LineCollection.color
--------------------
Deprecated in 2005, use ``set_color``


remove 'faceted' as a valid value for `shading` in ``tri.tripcolor``
--------------------------------------------------------------------
Use `edgecolor` instead. Added validation on ``shading`` to
only be valid values.


Remove ``set_colorbar`` method from ``ScalarMappable``
------------------------------------------------------
Remove ``set_colorbar`` method, use `colorbar` attribute directly.


patheffects.svg
---------------
- remove ``get_proxy_renderer`` method from ``AbstarctPathEffect`` class
- remove ``patch_alpha`` and ``offset_xy`` from ``SimplePatchShadow``


Remove ``testing.image_util.py``
--------------------------------
Contained only a no-longer used port of functionality from PIL


Remove ``mlab.FIFOBuffer``
--------------------------
Not used internally and not part of core mission of mpl.


Remove ``mlab.prepca``
----------------------
Deprecated in 2009.


Remove ``NavigationToolbar2QTAgg``
----------------------------------
Added no functionality over the base ``NavigationToolbar2Qt``
7 changes: 0 additions & 7 deletions lib/matplotlib/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,13 +675,6 @@ def get_transform(self):
def get_scale(self):
return self._scale.name

@cbook.deprecated('1.3')
def set_scale(self, value, **kwargs):
"""
This should be a private function (moved to _set_scale)
"""
self._set_scale(value, **kwargs)

def _set_scale(self, value, **kwargs):
self._scale = mscale.scale_factory(value, self, **kwargs)
self._scale.set_default_locators_and_formatters(self)
Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/backends/backend_qt4agg.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import matplotlib
from matplotlib.figure import Figure

from .backend_qt5agg import NavigationToolbar2QTAgg

from .backend_qt5agg import FigureCanvasQTAggBase

from .backend_agg import FigureCanvasAgg
Expand All @@ -27,7 +27,6 @@
from .backend_qt4 import draw_if_interactive
from .backend_qt4 import backend_version
######
from matplotlib.cbook import mplDeprecation

DEBUG = False

Expand Down
15 changes: 0 additions & 15 deletions lib/matplotlib/backends/backend_qt5agg.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@

import six

import os # not used
import sys
import ctypes
import warnings

import matplotlib
from matplotlib.figure import Figure

from .backend_agg import FigureCanvasAgg
Expand All @@ -28,8 +25,6 @@
######


from matplotlib.cbook import mplDeprecation

DEBUG = False

_decref = ctypes.pythonapi.Py_DecRef
Expand Down Expand Up @@ -201,15 +196,5 @@ def __init__(self, figure):
self._priv_update = self.update


class NavigationToolbar2QTAgg(NavigationToolbar2QT):
def __init__(*args, **kwargs):
warnings.warn('This class has been deprecated in 1.4 ' +
'as it has no additional functionality over ' +
'`NavigationToolbar2QT`. Please change your code to '
'use `NavigationToolbar2QT` instead',
mplDeprecation)
NavigationToolbar2QT.__init__(*args, **kwargs)


FigureCanvas = FigureCanvasQTAgg
FigureManager = FigureManagerQT
5 changes: 0 additions & 5 deletions lib/matplotlib/cm.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,6 @@ def __init__(self, norm=None, cmap=None):
self.colorbar = None
self.update_dict = {'array': False}

@cbook.deprecated('1.3', alternative='the colorbar attribute')
def set_colorbar(self, im, ax):
"""set the colorbar and axes instances associated with mappable"""
self.colorbar = im

def to_rgba(self, x, alpha=None, bytes=False):
"""
Return a normalized rgba array corresponding to *x*.
Expand Down
14 changes: 1 addition & 13 deletions lib/matplotlib/collections.py
Loading