Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a01039 commit b8cb5d8Copy full SHA for b8cb5d8
1 file changed
lib/matplotlib/tests/test_backend_pdf.py
@@ -232,3 +232,11 @@ def test_failing_latex(tmpdir):
232
plt.xlabel("$22_2_2$")
233
with pytest.raises(RuntimeError):
234
plt.savefig(path)
235
+
236
237
+def test_empty_rasterised():
238
+ # Check that emtpy figures that are rasterised save to pdf files fine
239
+ with PdfPages(io.BytesIO()) as pdf:
240
+ fig, ax = plt.subplots()
241
+ ax.plot([], [], rasterized=True)
242
+ fig.savefig(pdf, format="pdf")
0 commit comments