Skip to content

Commit 84ffb60

Browse files
committed
Remove deprecated code
1 parent cf819b6 commit 84ffb60

26 files changed

+57
-1453
lines changed

doc/api/api_changes.rst

+46
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,52 @@ For new features that were added to matplotlib, please see
1515
Changes in 1.3.x
1616
================
1717

18+
* The following items that were deprecated in version 1.2 or earlier
19+
have now been removed completely. Use the following mapping to
20+
update your code:
21+
22+
- The Qt 3.x backends (`qt` and `qtagg`) have been removed in
23+
favor of the Qt 4.x backends (`qt4` and `qt4agg`).
24+
25+
- The `matplotlib.nxutils` module has been removed. Use the
26+
functionality on `matplotlib.path.Path.contains_point` and
27+
friends instead.
28+
29+
- Instead of `axes.Axes.get_frame`, use `axes.Axes.patch`.
30+
31+
- The following `kwargs` to the `legend` function have been
32+
renamed:
33+
34+
- `pad` -> `borderpad`
35+
- `labelsep` -> `labelspacing`
36+
- `handlelen` -> `handlelength`
37+
- `handletextsep` -> `handletextpad`
38+
- `axespad` -> `borderaxespad`
39+
40+
Related to this, the following rcParams have been removed:
41+
42+
- `legend.pad`, `legend.labelsep`, `legend.handlelen`,
43+
`legend.handletextsep` and `legend.axespad`
44+
45+
- For the `hist` function, instead of `width`, use `rwidth`
46+
(relative width).
47+
48+
- On `patches.Circle`, the `resolution` kwarg has been removed.
49+
For a circle made up of line segments, use
50+
`patches.CirclePolygon`.
51+
52+
- The printing functions in the Wx backend have been removed due
53+
to the burden of keeping them up-to-date.
54+
55+
- `mlab.liaupunov` has been removed.
56+
57+
- `mlab.save`, `mlab.load`, `pylab.save` and `pylab.load` have
58+
been removed. We recommend using `numpy.savetxt` and
59+
`numpy.loadtxt` instead.
60+
61+
- `widgets.HorizontalSpanSelector` has been removed. Use
62+
`widgets.SpanSelector` instead.
63+
1864
* The top-level functions in `matplotlib.path` that are implemented in
1965
C++ were never meant to be public. Instead, users should use the
2066
Pythonic wrappers for them in the `path.Path` and

doc/faq/usage_faq.rst

+1-4
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ outputs, and each of these capabilities is called a backend; the
166166
"frontend" is the user facing code, ie the plotting code, whereas the
167167
"backend" does all the hard work behind-the-scenes to make the
168168
figure. There are two types of backends: user interface backends (for
169-
use in pygtk, wxpython, tkinter, qt, macosx, or fltk; also
169+
use in pygtk, wxpython, tkinter, qt4, macosx, or fltk; also
170170
referred to as "interactive backends") and hardcopy backends to
171171
make image files (PNG, SVG, PDF, PS; also referred to as "non-interactive
172172
backends").
@@ -266,8 +266,6 @@ WXAgg Agg rendering to to a :term:`wxWidgets` canvas
266266
WX Native :term:`wxWidgets` drawing to a :term:`wxWidgets` Canvas
267267
(not recommended) (requires wxPython_)
268268
TkAgg Agg rendering to a :term:`Tk` canvas (requires TkInter_)
269-
QtAgg Agg rendering to a :term:`Qt` canvas (requires PyQt_)
270-
(deprecated; use Qt4Agg)
271269
Qt4Agg Agg rendering to a :term:`Qt4` canvas (requires PyQt4_)
272270
FLTKAgg Agg rendering to a :term:`FLTK` canvas (requires pyFLTK_)
273271
(not widely used; consider TKAgg, GTKAgg, WXAgg, or
@@ -288,7 +286,6 @@ macosx Cocoa rendering in OSX windows
288286
.. _pycairo: http://www.cairographics.org/pycairo/
289287
.. _wxPython: http://www.wxpython.org/
290288
.. _TkInter: http://wiki.python.org/moin/TkInter
291-
.. _PyQt: http://www.riverbankcomputing.co.uk/software/pyqt/intro
292289
.. _PyQt4: http://www.riverbankcomputing.co.uk/software/pyqt/intro
293290
.. _pyFLTK: http://pyfltk.sourceforge.net
294291

doc/users/screenshots.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ rendering of strings with the *usetex* option.
265265
EEG demo
266266
=========
267267

268-
You can embed matplotlib into pygtk, wxpython, Tk, FLTK or Qt
268+
You can embed matplotlib into pygtk, wxpython, Tk, FLTK or Qt4
269269
applications. Here is a screenshot of an eeg viewer called pbrain
270270
which is part of the NeuroImaging in Python suite `NIPY
271271
<http://neuroimaging.scipy.org>`_. Pbrain is written in pygtk using

examples/animation/old_animation/animation_blit_qt.py

-66
This file was deleted.

examples/event_handling/pipong.py

-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ def key_press(self,event):
250250

251251
if event.key == 'g':
252252
#self.ax.clear()
253-
#self.ax.grid() # seems to be necessary for qt backend
254253
self.on = not self.on
255254
if event.key == 't':
256255
self.inst = not self.inst

examples/event_handling/pong_qt.py

-40
This file was deleted.

examples/event_handling/test_mouseclicks.py

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#matplotlib.use("WxAgg")
66
#matplotlib.use("TkAgg")
77
#matplotlib.use("GTKAgg")
8-
#matplotlib.use("QtAgg")
98
#matplotlib.use("Qt4Agg")
109
#matplotlib.use("CocoaAgg")
1110
#matplotlib.use("MacOSX")

examples/user_interfaces/embedding_in_qt.py

-137
This file was deleted.

lib/matplotlib/__init__.py

-5
Original file line numberDiff line numberDiff line change
@@ -719,11 +719,6 @@ def matplotlib_fname():
719719
}
720720

721721
_deprecated_ignore_map = {
722-
'legend.pad' : 'legend.borderpad',
723-
'legend.labelsep' : 'legend.labelspacing',
724-
'legend.handlelen' : 'legend.handlelength',
725-
'legend.handletextsep' : 'legend.handletextpad',
726-
'legend.axespad' : 'legend.borderaxespad',
727722
}
728723

729724

lib/matplotlib/axes.py

-10
Original file line numberDiff line numberDiff line change
@@ -1366,11 +1366,6 @@ def axis(self, *v, **kwargs):
13661366

13671367
return v
13681368

1369-
def get_frame(self):
1370-
"""Return the axes Rectangle frame"""
1371-
warnings.warn('use ax.patch instead', mplDeprecation)
1372-
return self.patch
1373-
13741369
def get_legend(self):
13751370
"""
13761371
Return the legend.Legend instance, or None if no legend is defined
@@ -8209,11 +8204,6 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
82098204
raise ValueError(
82108205
"orientation kwarg %s is not recognized" % orientation)
82118206

8212-
if kwargs.get('width') is not None:
8213-
raise mplDeprecation(
8214-
'hist now uses the rwidth to give relative width '
8215-
'and not absolute width')
8216-
82178207
if histtype == 'barstacked' and not stacked:
82188208
stacked = True
82198209

0 commit comments

Comments
 (0)