8000 test fix · matplotlib/matplotlib@91dafcd · GitHub
[go: up one dir, main page]

Skip to content

Commit 91dafcd

Browse files
authored
test fix
1 parent 5edf4e5 commit 91dafcd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/matplotlib/tests/test_figure.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,12 +1247,17 @@ def test_subfigure_scatter_size():
12471247
ax.scatter([1, 2, 3], [1, 2, 3], s=30, marker='s', color='r')
12481248
ax.scatter([3, 4, 5], [1, 2, 3], s=[20, 30, 40], marker='s', color='g')
12491249

1250+
12501251
def test_subfigure_pdf():
12511252
fig = plt.figure(layout='constrained')
1252-
fig.subfigures()
1253-
buffer = io.StringIO()
1253+
sub_fig = fig.subfigures()
1254+
ax = sub_fig.add_subplot(111)
1255+
b = ax.bar(1,1)
1256+
ax.bar_label(b)
1257+
buffer = io.BytesIO()
12541258
fig.savefig(buffer, format='pdf')
12551259

1260+
12561261
def test_add_subplot_kwargs():
12571262
# fig.add_subplot() always creates new axes, even if axes kwargs differ.
12581263
fig = plt.figure()

0 commit comments

Comments
 (0)
0