Skip to content

Code removal #3992

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Feb 6, 2015
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ install:
- |
if [[ $BUILD_DOCS == true ]]; then
sudo apt-get install -qq --no-install-recommends dvipng texlive-latex-base texlive-latex-extra texlive-fonts-recommended graphviz
pip install numpydoc linkchecker
pip install numpydoc linkchecker ipython
wget http://mirrors.kernel.org/ubuntu/pool/universe/f/fonts-humor-sans/fonts-humor-sans_1.0-1_all.deb
sudo dpkg -i fonts-humor-sans_1.0-1_all.deb
wget https://googlefontdirectory.googlecode.com/hg/ofl/felipa/Felipa-Regular.ttf
Expand Down Expand Up @@ -89,4 +89,4 @@ after_success:
git push --set-upstream origin gh-pages --force
else
echo "Will only deploy docs build from matplotlib master branch"
fi
fi
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
Original file line number Diff line number Diff line change
Expand Up @@ -1139,18 +1139,6 @@ def set_color(self, c):
"""
self.set_edgecolor(c)

def color(self, c):
"""
Set the color(s) of the line collection. *c* can be a
matplotlib color arg (all patches have same color), or a
sequence or rgba tuples; if it is a sequence the patches will
cycle through the sequence

ACCEPTS: matplotlib color arg or sequence of rgba tuples
"""
warnings.warn('LineCollection.color deprecated; use set_color instead')
return self.set_color(c)

def get_color(self):
return self._edgecolors
get_colors = get_color # for compatibility with old versions
Expand Down Expand Up @@ -1505,7 +1493,7 @@ def _set_transforms(self):
self._transforms[:, 1, 0] = widths * sin_angle
self._transforms[:, 1, 1] = heights * cos_angle
self._transforms[:, 2, 2] = 1.0

_affine = transforms.Affine2D
if self._units == 'xy':
m = ax.transData.get_affine().get_matrix().copy()
Expand Down
Loading