Skip to content

Commit 651ddcc

Browse files
committed
Don't forget to propagate kwargs from print_svgz to print_svg.
Otherwise metadata gets silently dropped, as well as correct support for rasterized elements in tight_bbox outputs. Try e.g. `plot([0, 1], rasterized=True); savefig("test.svgz")` and note that the line is drawn incorrectly. Don't bother with `*args`, which are ignored anyways.
1 parent 8c764dc commit 651ddcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_svg.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ def print_svg(self, filename, *args, **kwargs):
13221322
def print_svgz(self, filename, *args, **kwargs):
13231323
with cbook.open_file_cm(filename, "wb") as fh, \
13241324
gzip.GzipFile(mode='w', fileobj=fh) as gzipwriter:
1325-
return self.print_svg(gzipwriter)
1325+
return self.print_svg(gzipwriter, **kwargs)
13261326

13271327
@_check_savefig_extra_args
13281328
@_api.delete_parameter("3.4", "dpi")

0 commit comments

Comments
 (0)