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

Skip to content

Commit d771f77

Browse files
committed
FIX remove deprecated kwarg for matplotlib.use
1 parent 31d93e5 commit d771f77

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

nipy/labs/viz_tools/test/test_activation_maps.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
try:
1111
import matplotlib as mp
1212
# Make really sure that we don't try to open an Xserver connection.
13-
mp.use('svg', warn=False)
13+
mp.use('svg')
1414
import pylab as pl
1515
pl.switch_backend('svg')
1616
except ImportError:
@@ -28,7 +28,7 @@
2828

2929
def test_demo_plot_map():
3030
# This is only a smoke test
31-
mp.use('svg', warn=False)
31+
mp.use('svg')
3232
import pylab as pl
3333
pl.switch_backend('svg')
3434
demo_plot_map()
@@ -38,7 +38,7 @@ def test_demo_plot_map():
3838

3939
def test_plot_anat():
4040
# This is only a smoke test
41-
mp.use('svg', warn=False)
41+
mp.use('svg')
4242
import pylab as pl
4343
pl.switch_backend('svg')
4444
data = np.zeros((20, 20, 20))
@@ -85,7 +85,7 @@ def test_plot_map_empty():
8585
# Test that things don't crash when we give a map with nothing above
8686
# threshold
8787
# This is only a smoke test
88-
mp.use('svg', warn=False)
88+
mp.use('svg')
8989
import pylab as pl
9090
pl.switch_backend('svg')
9191
data = np.zeros((20, 20, 20))

nipy/labs/viz_tools/test/test_cm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
try:
99
import matplotlib as mp
1010
# Make really sure that we don't try to open an Xserver connection.
11-
mp.use('svg', warn=False)
11+
mp.use('svg')
1212
import pylab as pl
1313
pl.switch_backend('svg')
1414
except ImportError:
@@ -19,14 +19,14 @@
1919

2020
def test_dim_cmap():
2121
# This is only a smoke test
22-
mp.use('svg', warn=False)
22+
mp.use('svg')
2323
import pylab as pl
2424
dim_cmap(pl.cm.jet)
2525

2626

2727
def test_replace_inside():
2828
# This is only a smoke test
29-
mp.use('svg', warn=False)
29+
mp.use('svg')
3030
import pylab as pl
3131
pl.switch_backend('svg')
3232
replace_inside(pl.cm.jet, pl.cm.hsv, .2, .8)

nipy/labs/viz_tools/test/test_slicers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
try:
88
import matplotlib as mp
99
# Make really sure that we don't try to open an Xserver connection.
10-
mp.use('svg', warn=False)
10+
mp.use('svg')
1111
import pylab as pl
1212
pl.switch_backend('svg')
1313
except ImportError:
@@ -25,7 +25,7 @@ def test_demo_ortho_slicer():
2525
# conditioned on presence of MNI templated
2626
if not find_mni_template():
2727
raise nose.SkipTest("MNI Template is absent for the smoke test")
28-
mp.use('svg', warn=False)
28+
mp.use('svg')
2929
import pylab as pl
3030
pl.switch_backend('svg')
3131
demo_ortho_slicer()

nipy/testing/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def needs_mpl_agg(func):
127127
import matplotlib.pyplot as plt
128128
from nose.tools import make_decorator
129129
def agg_func(*args, **kwargs):
130-
matplotlib.use('agg', warn=False)
130+
matplotlib.use('agg')
131131
plt.switch_backend('agg')
132132
return func(*args, **kwargs)
133133
return make_decorator(func)(agg_func)

0 commit comments

Comments
 (0)