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

Skip to content

Commit 6deb323

Browse files
committed
Fix test
1 parent ac9215b commit 6deb323

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

lib/matplotlib/tests/test_agg.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,13 @@ def report_memory(i):
134134
def test_marker_with_nan():
135135
# This creates a marker with nans in it, which was segfaulting the
136136
# Agg backend (see #3722)
137-
fig = Figure()
137+
fig, ax = plt.subplots(1)
138138
steps = 1000
139139
data = np.arange(steps)
140-
ax = fig.add_subplot(1, 1, 1)
141140
ax.semilogx(data)
142141
ax.fill_between(data, data*0.8, data*1.2)
143142
buf = io.BytesIO()
144-
fig.savefig(buf)
145-
143+
fig.savefig(buf, format='png')
146144

147145

148146
if __name__ == "__main__":

0 commit comments

Comments
 (0)