GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Savefig does not issue a warning on a non-existent keyword n · Issue #192 · matplotlib/matplotlib

Savefig does not issue a warning on a non-existent keyword n #192

New issue
Copy link
New issue
Copy link
Closed
#17223
Closed
Savefig does not issue a warning on a non-existent keyword n#192
#17223
Copy link
Assignees
QuLogic
Labels
New featurestatus: confirmed bug
Milestone
v3.3.0

Description

@ddale
ddale
opened on Jun 20, 2011
Issue body actions

Original report at SourceForge, opened Tue Feb 8 16:27:19 2011

savefig does not issue a warning on a non-existent keyword name

Example
Savefig('filename.png', NonExistant=True)
Will not throw any warning. This is especially important if you accidentally misspell an argument, such as:
Savefig('filename.png', tranperent=True)
Notice 'transperent' instead of 'transparent'

Activity

  1. ootz0rz
    added a commit that references this issue on Mar 28, 2012

    quick patch for issue matplotlib#192

    b937b7a
  2. pelson commented on Jun 18, 2012

    @pelson
    pelson
    on Jun 18, 2012
    Member
    More actions

    @ootz0rz: I've had a quick look at your attached commit. I think probably the best approach to resolving this issue would be to go through the backend_*.py files, looking for the cases where **kwargs have been accepted, but not used. For instance, if you remove the **kwargs in backends_agg.py's print_png function, then you might find that Python does the error handling for you for "pngs" at least.

    Do you fancy getting involved and seeing how you get on implementing a fix?

  3. ghost assigned
    pelson
    on Jun 18, 2012
  4. tacaswell
    modified the milestones: v1.4.x, This milestone has been deleted on Aug 18, 2014
  5. tacaswell
    modified the milestones: This milestone has been deleted, This milestone has been deleted on Feb 16, 2016
  6. tacaswell commented on Feb 16, 2016

    @tacaswell
    tacaswell
    on Feb 16, 2016
    Member
    More actions

    Started to look into this again, it is a rat's nest.

    print_figure throws the kitchen sink at the underlying print functions so if we want to lock this down we need to lock down the union of the keywords expected in all of the print functions.

  7. QuLogic
    self-assigned this
    on Apr 22, 2020
  8. anntzer commented on Apr 22, 2020

    @anntzer
    anntzer
    on Apr 22, 2020
    Contributor
    More actions

    fwiw mplcairo simply lists the (extra) allowed kwargs in mplcairo.base._check_print_extra_kwargs, and throws if anything not in there is passed.

  9. QuLogic commented on Apr 22, 2020

    @QuLogic
    QuLogic
    on Apr 22, 2020
    Member
    More actions

    Unfortunately, there's some incomplete implementations of some keyword arguments in some backends that makes this a bit more difficult than it should be.

  10. QuLogic
    added 2 commits that reference this issue on Apr 23, 2020

    Warn on invalid savefig keyword arguments.

    This issue will close once commit 0bd3491 is merged into the 'main' branch.
    0bd3491

    Warn on invalid savefig keyword arguments.

    This issue will close once commit cb47539 is merged into the 'main' branch.
    cb47539
  11. QuLogic
    added 3 commits that reference this issue on Jun 10, 2020

    Warn on invalid savefig keyword arguments.

    This issue will close once commit f74575c is merged into the 'main' branch.
    f74575c

    Warn on invalid savefig keyword arguments.

    This issue will close once commit f25f1eb is merged into the 'main' branch.
    f25f1eb

    Warn on invalid savefig keyword arguments.

    This issue will close once commit b7a574f is merged into the 'main' branch.
    b7a574f
  12. QuLogic
    closed this as completedin #17223on Jun 15, 2020
  13. QuLogic
    modified the milestones: This milestone has been deleted, v3.3.0 on Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @QuLogic
    QuLogic

Labels

New featurestatus: confirmed bug

Type

No type

Projects

No projects

    Milestone

    • v3.3.0

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.