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
Suggest unexisting filename when saving displayed figure #3608
Comments
@strazdas @tacaswell How do you recommend specifying the pattern? "figure_1.png", "figure_1 (1).png", "figure_1 (2).png" and etc. If you wanted to specify the pattern, the only way I could see is specifying a boolean control for whether to inject a space between the number and title name, and which character you'd like to use as the brackets. |
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 Thanks for the response. With underscores, we'd have How would you like to have it with dash or dots? Before or after the file's extension? For example "figure_1-2.png" or "figure_1.png-2"; "figure_1.2.png" or "figure_1.png.2". |
"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. |
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. |
Agreed! I will adjust the fix accordingly and aim to make a PR soon. |
Sorry @stallone1993! I already had this feature completed. Please see #4221. I would appreciate your feedback. |
@umairidris - thanks for the heads up. My fix is pretty similar to yours (though I had it completed earlier on in the day - just wanted to make sure I was solving it in the preferred way). Cheers! |
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 tofigure_<number_of_figures+1>.png
.It would be great if It was possible to specify the filename pattern in
matplotlibrc
file.The text was updated successfully, but these errors were encountered: