svg_utils
svg_utils copied to clipboard
Workaround mpl units bug not necessary
Thanks a lot for this really useful package!
Just want to report that the workaround mpl units bug, i.e. to set the size of the SVG in pixel instead of points, seems to be unnecessary. In this matplotlib commit, the units were changed on purpose.
Indeed, in the current version the resulting SVG (e.g. when opened in Inkscape) does not have the size that I specified as a figsize
in matplotlib. Undoing the workaround, e.g. using
w_svg, h_svg = svg_mpl.get_size()
svg_mpl.set_size((w_svg+'pt', h_svg+'pt'))
yields a SVG where the size agrees with the figsize
.
I assume there was a good reason to introduce the workaround so I am posting this as an issue here. Of course I would be willing to create a PR.