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

Skip to content

Commit 3fd13b3

Browse files
committed
Minor cleanup; removed old ipython hack.
svn path=/trunk/matplotlib/; revision=4112
1 parent 8dc3175 commit 3fd13b3

2 files changed

Lines changed: 4 additions & 12 deletions

File tree

lib/matplotlib/backends/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
'new_figure_manager', 'backend_version']
77

88
interactive_bk = ['GTK', 'GTKAgg', 'GTKCairo', 'FltkAgg', 'QtAgg', 'Qt4Agg',
9-
'TkAgg', 'WX', 'WXAgg', 'CocoaAgg', 'Aqt']
9+
'TkAgg', 'WX', 'WXAgg', 'CocoaAgg']
1010
non_interactive_bk = ['Agg2', 'Agg', 'Cairo', 'EMF', 'GDK',
1111
'Pdf', 'PS', 'SVG', 'Template']
1212
all_backends = interactive_bk + non_interactive_bk
@@ -50,7 +50,4 @@ def show(): pass
5050

5151
return new_figure_manager, draw_if_interactive, show
5252

53-
# a hack to keep old versions of ipython working with mpl
54-
if 'IPython.Shell' in sys.modules:
55-
new_figure_manager, draw_if_interactive, show = pylab_setup()
5653

lib/matplotlib/pyplot.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,15 @@
3333

3434
## Global ##
3535

36-
# a hack to keep old versions of ipython working with mpl after bug
37-
# fix #1209354
38-
if 'IPython.Shell' in sys.modules:
39-
from matplotlib.backends import new_figure_manager, draw_if_interactive, show
40-
else:
41-
from matplotlib.backends import pylab_setup
42-
new_figure_manager, draw_if_interactive, show = pylab_setup()
36+
from matplotlib.backends import pylab_setup
37+
new_figure_manager, draw_if_interactive, show = pylab_setup()
4338

4439
def switch_backend(newbackend):
4540
"""
4641
Swtich the default backend to newbackend. This feature is
4742
EXPERIMENTAL, and is only expected to work switching to an image
4843
backend. Eg, if you have a bunch of PS scripts that you want to
49-
run from an interactive ipython session, yuo may want to switch to
44+
run from an interactive ipython session, you may want to switch to
5045
the PS backend before running them to avoid having a bunch of GUI
5146
windows popup. If you try to interactively switch from one GUI
5247
backend to another, you will explode.

0 commit comments

Comments
 (0)