Skip to content

default savefig format #152

Open
@bjlittle

Description

@bjlittle

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions