Skip to content

Commit c8aeb41

Browse files
committed
update mpl for tests
1 parent b564b88 commit c8aeb41

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

tests/test_cleanfigure.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def test_surface3D(self):
174174

175175
with plt.rc_context(rc=RC_PARAMS):
176176
fig = plt.figure()
177-
ax = fig.gca(projection="3d")
177+
ax = plt.axes(projection="3d")
178178

179179
# Plot the surface.
180180
surf = ax.plot_surface(
@@ -217,7 +217,7 @@ def test_trisurface3D(self):
217217

218218
with plt.rc_context(rc=RC_PARAMS):
219219
fig = plt.figure()
220-
ax = fig.gca(projection="3d")
220+
ax = plt.axes(projection="3d")
221221

222222
ax.plot_trisurf(x, y, z, linewidth=0.2, antialiased=True)
223223
with pytest.warns(Warning):
@@ -244,7 +244,7 @@ def test_polygon3D(self):
244244

245245
with plt.rc_context(rc=RC_PARAMS):
246246
fig = plt.figure()
247-
ax = fig.gca(projection="3d")
247+
ax = plt.axes(projection="3d")
248248

249249
def cc(arg):
250250
"""
@@ -302,7 +302,7 @@ def test_bar3D(self):
302302
def test_quiver3D(self):
303303
with plt.rc_context(rc=RC_PARAMS):
304304
fig = plt.figure()
305-
ax = fig.gca(projection="3d")
305+
ax = plt.axes(projection="3d")
306306

307307
# Make the grid
308308
x, y, z = np.meshgrid(
@@ -328,8 +328,7 @@ def test_quiver3D(self):
328328

329329
def test_2D_in_3D(self):
330330
with plt.rc_context(rc=RC_PARAMS):
331-
fig = plt.figure()
332-
ax = fig.gca(projection="3d")
331+
ax = plt.axes(projection="3d")
333332

334333
# Plot a sin curve using the x and y axes.
335334
x = np.linspace(0, 1, 100)

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ deps =
88
pytest
99
pytest-cov
1010
pytest-codeblocks
11-
matplotlib == 3.3.4
11+
matplotlib == 3.4.3
1212
pytest-randomly
1313
commands =
1414
pytest {posargs} --codeblocks

0 commit comments

Comments
 (0)