8000 Improve docs for format determination in savefig()/imsave(). by anntzer · Pull Request #13260 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Improve docs for format determination in savefig()/imsave(). #13260

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

Merged
merged 1 commit into from
Jan 23, 2019

Conversation

anntzer
Copy link
Contributor
@anntzer anntzer commented Jan 22, 2019

Most importantly, the current backend is mostly irrelevant (unlike what
the docs state), because we handle backend switching transparently.

Preliminary work for #13253 (comment).

Note that the actual behavior is actually slightly different from the documented one: if the active canvas is PDF, PS or SVG and a format cannot be derived from fname or from format, then the format used will be pdf/ps/svg (respectively) rather than rcParams["savefig.format"]. I would like to change that to instead always use the rcParam, but that'll wait for #12760 first (for rebase reasons). (Why allow saving to png when using a pdf canvas? Because to me that's similar as allowing to save to pdf when using an agg (=raster) canvas, and transparently handling the backend switching.)

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Most importantly, the current backend is mostly irrelevant (unlike what
the docs state), because we handle backend switching transparently.
Copy link
Member
@NelleV NelleV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@NelleV NelleV merged commit 2660901 into matplotlib:master Jan 23, 2019
@QuLogic QuLogic added this to the v3.1 milestone Jan 23, 2019
@anntzer anntzer deleted the savefig-filetype-doc branch January 23, 2019 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0