You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Suggest unexisting filename when saving displayed figure #3608
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.
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.
Activity
efiring commentedon Mar 14, 2015
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.
efiring commentedon Mar 15, 2015
"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.
efiring commentedon Mar 15, 2015
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.
umairidris commentedon Mar 15, 2015
Sorry @stallone1993! I already had this feature completed. Please see #4221. I would appreciate your feedback.