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

default savefig format #152

Open
bjlittle opened this issue May 19, 2022 · 3 comments · May be fixed by #160
Open

default savefig format #152

bjlittle opened this issue May 19, 2022 · 3 comments · May be fixed by #160

Comments

@bjlittle
Copy link
Contributor

In the process of penning #150, I noticed that when capturing the test image to an io.Bytes in-memory buffer:

imgdata = io.BytesIO()
fig.savefig(imgdata, **savefig_kwargs)

That the format kwarg to savefig isn't used.

Would you be adverse to defaulting to format='png', particularly when writing to a buffer, as (from what I understand) matplotlib will default to the rcParams to select the file-format to save to the buffer for the image, and this could be a source confusion/issues for hashing repeatability for developers when testing.

i.e., what I'm proposing is that a format='png' is injected into the savefig_kwargs, iff not specified by the caller as a kwarg option in the marker decorator.

@bjlittle
Copy link
Contributor Author

BTW I'm happy to take this on, if you guys are in favour of adopting this approach 👍

@dopplershift
Copy link
Contributor

Seems fine to me.

@Cadair
Copy link
Contributor

Cadair commented May 20, 2022

Yeah sounds good.

@bjlittle bjlittle linked a pull request May 21, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants