Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround mpl units bug not necessary #79

Open
AlexVanMeegen opened this issue Aug 9, 2021 · 0 comments
Open

Workaround mpl units bug not necessary #79

AlexVanMeegen opened this issue Aug 9, 2021 · 0 comments

Comments

@AlexVanMeegen
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant