Skip to content
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

Deprecations and housecleaning #2026

Merged
merged 11 commits into from May 21, 2013
69 changes: 69 additions & 0 deletions doc/api/api_changes.rst
Expand Up @@ -12,9 +12,78 @@ For new features that were added to matplotlib, please see
:ref:`whats-new`.


.. _changes_in_1_3:

Changes in 1.3.x
================

* The following items that were deprecated in version 1.2 or earlier
have now been removed completely. Use the following mapping to
update your code:

- The Qt 3.x backends (`qt` and `qtagg`) have been removed in
favor of the Qt 4.x backends (`qt4` and `qt4agg`).

- The FltkAgg and Emf backends have been removed.

- The `matplotlib.nxutils` module has been removed. Use the
functionality on `matplotlib.path.Path.contains_point` and
friends instead.

- Instead of `axes.Axes.get_frame`, use `axes.Axes.patch`.

- The following `kwargs` to the `legend` function have been
renamed:

- `pad` -> `borderpad`
- `labelsep` -> `labelspacing`
- `handlelen` -> `handlelength`
- `handletextsep` -> `handletextpad`
- `axespad` -> `borderaxespad`

Related to this, the following rcParams have been removed:

- `legend.pad`, `legend.labelsep`, `legend.handlelen`,
`legend.handletextsep` and `legend.axespad`

- For the `hist` function, instead of `width`, use `rwidth`
(relative width).

- On `patches.Circle`, the `resolution` kwarg has been removed.
For a circle made up of line segments, use
`patches.CirclePolygon`.

- The printing functions in the Wx backend have been removed due
to the burden of keeping them up-to-date.

- `mlab.liaupunov` has been removed.

- `mlab.save`, `mlab.load`, `pylab.save` and `pylab.load` have
been removed. We recommend using `numpy.savetxt` and
`numpy.loadtxt` instead.

- `widgets.HorizontalSpanSelector` has been removed. Use
`widgets.SpanSelector` instead.

* The CocoaAgg backend has been deprecated, with the possibility for
deletion or resurrection in a future release.

* The top-level functions in `matplotlib.path` that are implemented in
C++ were never meant to be public. Instead, users should use the
Pythonic wrappers for them in the `path.Path` and
`collections.Collection` classes. Use the following mapping to update
your code:

- `point_in_path` -> `path.Path.contains_point`
- `get_path_extents` -> `path.Path.get_extents`
- `point_in_path_collection` -> `collection.Collection.contains`
- `path_in_path` -> `path.Path.contains_path`
- `path_intersects_path` -> `path.Path.intersects_path`
- `convert_path_to_polygons` -> `path.Path.to_polygons`
- `cleanup_path` -> `path.Path.cleaned`
- `points_in_path` -> `path.Path.contains_points`
- `clip_path_to_rect` -> `path.Path.clip_to_bbox`

* `Path` objects can now be marked as `readonly` by passing
`readonly=True` to its constructor. The built-in path singletons,
obtained through `Path.unit*` class methods return readonly paths.
Expand Down
18 changes: 5 additions & 13 deletions doc/faq/usage_faq.rst
Expand Up @@ -164,12 +164,11 @@ others in web application servers to dynamically serve up graphs.
To support all of these use cases, matplotlib can target different
outputs, and each of these capabilities is called a backend; the
"frontend" is the user facing code, ie the plotting code, whereas the
"backend" does all the hard work behind-the-scenes to make the
figure. There are two types of backends: user interface backends (for
use in pygtk, wxpython, tkinter, qt, macosx, or fltk; also
referred to as "interactive backends") and hardcopy backends to
make image files (PNG, SVG, PDF, PS; also referred to as "non-interactive
backends").
"backend" does all the hard work behind-the-scenes to make the figure.
There are two types of backends: user interface backends (for use in
pygtk, wxpython, tkinter, qt4, or macosx; also referred to as
"interactive backends") and hardcopy backends to make image files
(PNG, SVG, PDF, PS; also referred to as "non-interactive backends").

There are a two primary ways to configure your backend. One is to set
the ``backend`` parameter in your ``matplotlibrc`` file (see
Expand Down Expand Up @@ -266,12 +265,7 @@ WXAgg Agg rendering to to a :term:`wxWidgets` canvas
WX Native :term:`wxWidgets` drawing to a :term:`wxWidgets` Canvas
(not recommended) (requires wxPython_)
TkAgg Agg rendering to a :term:`Tk` canvas (requires TkInter_)
QtAgg Agg rendering to a :term:`Qt` canvas (requires PyQt_)
(deprecated; use Qt4Agg)
Qt4Agg Agg rendering to a :term:`Qt4` canvas (requires PyQt4_)
FLTKAgg Agg rendering to a :term:`FLTK` canvas (requires pyFLTK_)
(not widely used; consider TKAgg, GTKAgg, WXAgg, or
QT4Agg instead)
macosx Cocoa rendering in OSX windows
(presently lacks blocking show() behavior when matplotlib
is in non-interactive mode)
Expand All @@ -288,9 +282,7 @@ macosx Cocoa rendering in OSX windows
.. _pycairo: http://www.cairographics.org/pycairo/
.. _wxPython: http://www.wxpython.org/
.. _TkInter: http://wiki.python.org/moin/TkInter
.. _PyQt: http://www.riverbankcomputing.co.uk/software/pyqt/intro
.. _PyQt4: http://www.riverbankcomputing.co.uk/software/pyqt/intro
.. _pyFLTK: http://pyfltk.sourceforge.net



Expand Down
9 changes: 0 additions & 9 deletions doc/glossary/index.rst
Expand Up @@ -22,10 +22,6 @@ Glossary
EPS
Encapsulated Postscript (`EPS <http://en.wikipedia.org/wiki/Encapsulated_PostScript>`_)

FLTK
`FLTK <http://www.fltk.org/>`_ (pronounced "fulltick") is a cross-platform C++ GUI toolkit for
UNIX/Linux (X11), Microsoft Windows, and MacOS X

freetype
`freetype <http://www.freetype.org/>`_ is a font rasterization
library used by matplotlib which supports TrueType, Type 1, and
Expand Down Expand Up @@ -68,11 +64,6 @@ Glossary
channel. PDF was designed in part as a next-generation document
format to replace postscript

pyfltk
`pyfltk <http://pyfltk.sourceforge.net/>`_ provides python
wrappers for the :term:`FLTK` widgets library for use with
FLTKAgg

pygtk
`pygtk <http://www.pygtk.org/>`_ provides python wrappers for
the :term:`GTK` widgets library for use with the GTK or GTKAgg
Expand Down
26 changes: 13 additions & 13 deletions doc/users/event_handling.rst
Expand Up @@ -4,19 +4,19 @@
Event handling and picking
**************************

matplotlib works with 6 user interface toolkits (wxpython, tkinter,
qt, gtk, fltk and macosx) and in order to support features like interactive
panning and zooming of figures, it is helpful to the developers to
have an API for interacting with the figure via key presses and mouse
movements that is "GUI neutral" so we don't have to repeat a lot of
code across the different user interfaces. Although the event
handling API is GUI neutral, it is based on the GTK model, which was
the first user interface matplotlib supported. The events that are
triggered are also a bit richer vis-a-vis matplotlib than standard GUI
events, including information like which :class:`matplotlib.axes.Axes`
the event occurred in. The events also understand the matplotlib
coordinate system, and report event locations in both pixel and data
coordinates.
matplotlib works with a number of user interface toolkits (wxpython,
tkinter, qt4, gtk, and macosx) and in order to support features like
interactive panning and zooming of figures, it is helpful to the
developers to have an API for interacting with the figure via key
presses and mouse movements that is "GUI neutral" so we don't have to
repeat a lot of code across the different user interfaces. Although
the event handling API is GUI neutral, it is based on the GTK model,
which was the first user interface matplotlib supported. The events
that are triggered are also a bit richer vis-a-vis matplotlib than
standard GUI events, including information like which
:class:`matplotlib.axes.Axes` the event occurred in. The events also
understand the matplotlib coordinate system, and report event
locations in both pixel and data coordinates.

.. _event-connections:

Expand Down
2 changes: 1 addition & 1 deletion doc/users/screenshots.rst
Expand Up @@ -265,7 +265,7 @@ rendering of strings with the *usetex* option.
EEG demo
=========

You can embed matplotlib into pygtk, wxpython, Tk, FLTK or Qt
You can embed matplotlib into pygtk, wxpython, Tk, or Qt4
applications. Here is a screenshot of an eeg viewer called pbrain
which is part of the NeuroImaging in Python suite `NIPY
<http://neuroimaging.scipy.org>`_. Pbrain is written in pygtk using
Expand Down
10 changes: 10 additions & 0 deletions doc/users/whats_new.rst
Expand Up @@ -21,6 +21,16 @@ revision, see the :ref:`github-stats`.

new in matplotlib-1.3
=====================

Housecleaning
-------------

A number of features that were deprecated in 1.2 or earlier, or have
not been in a working state for a long time have been removed.
Highlights in include removing the Qt version 3 backends, and the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete "in".

FltkAgg and Emf backends. See :ref:`changes_in_1_3` for a complete
list.

`xkcd`-style sketch plotting
----------------------------

Expand Down
55 changes: 0 additions & 55 deletions examples/animation/old_animation/animation_blit_fltk.py

This file was deleted.

66 changes: 0 additions & 66 deletions examples/animation/old_animation/animation_blit_qt.py

This file was deleted.

1 change: 0 additions & 1 deletion examples/event_handling/pipong.py
Expand Up @@ -250,7 +250,6 @@ def key_press(self,event):

if event.key == 'g':
#self.ax.clear()
#self.ax.grid() # seems to be necessary for qt backend
self.on = not self.on
if event.key == 't':
self.inst = not self.inst
Expand Down
40 changes: 0 additions & 40 deletions examples/event_handling/pong_qt.py

This file was deleted.

1 change: 0 additions & 1 deletion examples/event_handling/test_mouseclicks.py
Expand Up @@ -5,7 +5,6 @@
#matplotlib.use("WxAgg")
#matplotlib.use("TkAgg")
#matplotlib.use("GTKAgg")
#matplotlib.use("QtAgg")
#matplotlib.use("Qt4Agg")
#matplotlib.use("CocoaAgg")
#matplotlib.use("MacOSX")
Expand Down
5 changes: 1 addition & 4 deletions examples/misc/rc_traits.py
Expand Up @@ -127,7 +127,7 @@ class PatchRC(traits.HasTraits):
antialiased = flexible_true_trait

timezones = 'UTC', 'US/Central', 'ES/Eastern' # fixme: and many more
backends = ('GTKAgg', 'Cairo', 'FltkAgg', 'GDK', 'GTK', 'Agg',
backends = ('GTKAgg', 'Cairo', 'GDK', 'GTK', 'Agg',
'GTKCairo', 'PS', 'SVG', 'Template', 'TkAgg',
'WX')

Expand Down Expand Up @@ -192,6 +192,3 @@ def __init__(self,
print()
print('Patch')
p.print_traits()