Skip to content

Suggest unexisting filename when saving displayed figure #3608

Closed

Description

@strazdas

Wanted feature Automatically update the suggested filename to save a figure to if a file with the default filename already exists.

Situation now The default interface always suggests figure_1.png filename even when it exists. This means that, each time I want to save a figure, I have to check how many figures I have and update the filename to figure_<number_of_figures+1>.png.

It would be great if It was possible to specify the filename pattern in matplotlibrc file.

An image of the interface:

Activity

  1. added this to the milestone on Oct 2, 2014
  2. efiring commented on Mar 14, 2015

    @efiring
    Member

    If you turn this into a PR, please don't try to put a space in the file name. Use another underscore, or a dash, or a dot.

  3. efiring commented on Mar 15, 2015

    @efiring
    Member

    "figure_1-2.png" would work fine. One doesn't want to interfere with the extension, since so many programs use it to decide what to do with a file.

  4. efiring commented on Mar 15, 2015

    @efiring
    Member

    Also, the dash is probably better than a dot; some programs stupidly treat everything after the first dot as the extension. I am not aware of anything that would cause problems with a dash.

  5. umairidris commented on Mar 15, 2015

    @umairidris

    Sorry @stallone1993! I already had this feature completed. Please see #4221. I would appreciate your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions