matplotlib/matplotlib — pull request #2617 by fariza (2013-11-27 21:16:22+00:00)
Title:  factor the pyplot dependence out of the figure_manager classes

This is a fisrt try to remove the pyplot/pylab stuff from the figure manager.
The implementation is currently only for GTK3 for review and coments

This idea has been mentioned (mainly by @tacaswell and myself) several times in PRs https://github.com/matplotlib/matplotlib/pull/2604, https://github.com/matplotlib/matplotlib/pull/2465, https://github.com/matplotlib/matplotlib/pull/1849 and on the mailing list

Objective
-------
The main idea is to have figure, canvas and manager that are independent from pyplot/pylab.
This brings among other things, the possibility to use the "ready to use" GUI inside other applications, without having to reconstruct the window/toolbar etc..

Proposed modifications
----

The new files
* backend_gtk3_gui.py
* backend_gtk3agg_gui.py
* backend_gtk3cairo_gui.py

Contain the independent classes, that can be used anywhere without calling the pyplot/pylab stuff.

The existing files
* backend_gtk3.py
* backend_gtk3agg.py
* backend_gtk3cairo.py

Contain the classes that depend on pyplot/plylab. These are the classes that are currently used and can be used without any side effect.

Impact on the existing backends
-----
There are two small modifications to the `backend_bases.py` and the respective correction for all the backends. So they should be working the same.