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

Skip to content

Commit e2a8342

Browse files
committed
Merge pull request matplotlib#3992 from tacaswell/code_removal
Code removal
2 parents 8f10470 + 056ba7a commit e2a8342

20 files changed

+95
-1692
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ install:
3333
- |
3434
if [[ $BUILD_DOCS == true ]]; then
3535
sudo apt-get install -qq --no-install-recommends dvipng texlive-latex-base texlive-latex-extra texlive-fonts-recommended graphviz
36-
pip install numpydoc linkchecker
36+
pip install numpydoc linkchecker ipython
3737
wget http://mirrors.kernel.org/ubuntu/pool/universe/f/fonts-humor-sans/fonts-humor-sans_1.0-1_all.deb
3838
sudo dpkg -i fonts-humor-sans_1.0-1_all.deb
3939
wget https://googlefontdirectory.googlecode.com/hg/ofl/felipa/Felipa-Regular.ttf
@@ -89,4 +89,4 @@ after_success:
8989
git push --set-upstream origin gh-pages --force
9090
else
9191
echo "Will only deploy docs build from matplotlib master branch"
92-
fi
92+
fi

doc/api/api_changes/code_removal.rst

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,78 @@ Code Removal
33

44
Legend
55
------
6-
Removed handling of `loc` as a positional argument to `Legend`
6+
- Removed handling of `loc` as a positional argument to `Legend`
7+
8+
9+
Legend handlers
10+
~~~~~~~~~~~~~~~
11+
Remove code to allow legend handlers to be callable. They must now
12+
implement a method ``legend_artist``.
13+
14+
15+
Axis
16+
----
17+
Removed method ``set_scale``. This is now handled via a private method which
18+
should not be used directly by users. It is called via ``Axes.set_{x,y}scale``
19+
which takes care of ensuring the coupled changes are also made to the Axes object.
20+
21+
finance.py
22+
----------
23+
Removed functions with ambiguous argument order from finance.py
24+
25+
26+
Annotation
27+
----------
28+
Removed ``textcoords`` and ``xytext`` proprieties from Annotation objects.
29+
30+
31+
spinxext.ipython_*.py
32+
---------------------
33+
Both ``ipython_console_highlighting`` and ``ipython_directive`` have been moved to
34+
`IPython`.
35+
36+
Change your import from 'matplotlib.sphinxext.ipython_directive' to
37+
'IPython.sphinxext.ipython_directive' and from 'matplotlib.sphinxext.ipython_directive' to
38+
'IPython.sphinxext.ipython_directive'
39+
40+
41+
LineCollection.color
42+
--------------------
43+
Deprecated in 2005, use ``set_color``
44+
45+
46+
remove 'faceted' as a valid value for `shading` in ``tri.tripcolor``
47+
--------------------------------------------------------------------
48+
Use `edgecolor` instead. Added validation on ``shading`` to
49+
only be valid values.
50+
51+
52+
Remove ``set_colorbar`` method from ``ScalarMappable``
53+
------------------------------------------------------
54+
Remove ``set_colorbar`` method, use `colorbar` attribute directly.
55+
56+
57+
patheffects.svg
58+
---------------
59+
- remove ``get_proxy_renderer`` method from ``AbstarctPathEffect`` class
60+
- remove ``patch_alpha`` and ``offset_xy`` from ``SimplePatchShadow``
61+
62+
63+
Remove ``testing.image_util.py``
64+
--------------------------------
65+
Contained only a no-longer used port of functionality from PIL
66+
67+
68+
Remove ``mlab.FIFOBuffer``
69+
--------------------------
70+
Not used internally and not part of core mission of mpl.
71+
72+
73+
Remove ``mlab.prepca``
74+
----------------------
75+
Deprecated in 2009.
76+
77+
78+
Remove ``NavigationToolbar2QTAgg``
79+
----------------------------------
80+
Added no functionality over the base ``NavigationToolbar2Qt``

lib/matplotlib/axis.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -675,13 +675,6 @@ def get_transform(self):
675675
def get_scale(self):
676676
return self._scale.name
677677

678-
@cbook.deprecated('1.3')
679-
def set_scale(self, value, **kwargs):
680-
"""
681-
This should be a private function (moved to _set_scale)
682-
"""
683-
self._set_scale(value, **kwargs)
684-
685678
def _set_scale(self, value, **kwargs):
686679
self._scale = mscale.scale_factory(value, self, **kwargs)
687680
self._scale.set_default_locators_and_formatters(self)

lib/matplotlib/backends/backend_qt4agg.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import matplotlib
1515
from matplotlib.figure import Figure
1616

17-
from .backend_qt5agg import NavigationToolbar2QTAgg
17+
1818
from .backend_qt5agg import FigureCanvasQTAggBase
1919

2020
from .backend_agg import FigureCanvasAgg
@@ -27,7 +27,6 @@
2727
from .backend_qt4 import draw_if_interactive
2828
from .backend_qt4 import backend_version
2929
######
30-
from matplotlib.cbook import mplDeprecation
3130

3231
DEBUG = False
3332

lib/matplotlib/backends/backend_qt5agg.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@
66

77
import six
88

9-
import os # not used
109
import sys
1110
import ctypes
12-
import warnings
1311

14-
import matplotlib
1512
from matplotlib.figure import Figure
1613

1714
from .backend_agg import FigureCanvasAgg
@@ -28,8 +25,6 @@
2825
######
2926

3027

31-
from matplotlib.cbook import mplDeprecation
32-
3328
DEBUG = False
3429

3530
_decref = ctypes.pythonapi.Py_DecRef
@@ -201,15 +196,5 @@ def __init__(self, figure):
201196
self._priv_update = self.update
202197

203198

204-
class NavigationToolbar2QTAgg(NavigationToolbar2QT):
205-
def __init__(*args, **kwargs):
206-
warnings.warn('This class has been deprecated in 1.4 ' +
207-
'as it has no additional functionality over ' +
208-
'`NavigationToolbar2QT`. Please change your code to '
209-
'use `NavigationToolbar2QT` instead',
210-
mplDeprecation)
211-
NavigationToolbar2QT.__init__(*args, **kwargs)
212-
213-
214199
FigureCanvas = FigureCanvasQTAgg
215200
FigureManager = FigureManagerQT

lib/matplotlib/cm.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,6 @@ def __init__(self, norm=None, cmap=None):
200200
self.colorbar = None
201201
self.update_dict = {'array': False}
202202

203-
@cbook.deprecated('1.3', alternative='the colorbar attribute')
204-
def set_colorbar(self, im, ax):
205-
"""set the colorbar and axes instances associated with mappable"""
206-
self.colorbar = im
207-
208203
def to_rgba(self, x, alpha=None, bytes=False):
209204
"""
210205
Return a normalized rgba array corresponding to *x*.

lib/matplotlib/collections.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,18 +1139,6 @@ def set_color(self, c):
11391139
"""
11401140
self.set_edgecolor(c)
11411141

1142-
def color(self, c):
1143-
"""
1144-
Set the color(s) of the line collection. *c* can be a
1145-
matplotlib color arg (all patches have same color), or a
1146-
sequence or rgba tuples; if it is a sequence the patches will
1147-
cycle through the sequence
1148-
1149-
ACCEPTS: matplotlib color arg or sequence of rgba tuples
1150-
"""
1151-
warnings.warn('LineCollection.color deprecated; use set_color instead')
1152-
return self.set_color(c)
1153-
11541142
def get_color(self):
11551143
return self._edgecolors
11561144
get_colors = get_color # for compatibility with old versions
@@ -1505,7 +1493,7 @@ def _set_transforms(self):
15051493
self._transforms[:, 1, 0] = widths * sin_angle
15061494
self._transforms[:, 1, 1] = heights * cos_angle
15071495
self._transforms[:, 2, 2] = 1.0
1508-
1496+
15091497
_affine = transforms.Affine2D
15101498
if self._units == 'xy':
15111499
m = ax.transData.get_affine().get_matrix().copy()

0 commit comments

Comments
 (0)