Skip to content

Commit 69b51f1

Browse files
authored
Merge pull request matplotlib#20248 from anntzer/pgferr
Replace pgf image-streaming warning by error.
2 parents 4723f8a + 9ff8910 commit 69b51f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/backends/backend_pgf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,9 +624,9 @@ def draw_image(self, gc, x, y, im, transform=None):
624624
return
625625

626626
if not os.path.exists(getattr(self.fh, "name", "")):
627-
_api.warn_external(
627+
raise ValueError(
628628
"streamed pgf-code does not support raster graphics, consider "
629-
"using the pgf-to-pdf option.")
629+
"using the pgf-to-pdf option")
630630

631631
# save the images to png files
632632
path = pathlib.Path(self.fh.name)

0 commit comments

Comments
 (0)