Title: [ENH]: pre-set file name for GUI save dialog in rcParams · Issue #27774 · matplotlib/matplotlib · GitHub
Open Graph Title: [ENH]: pre-set file name for GUI save dialog in rcParams · Issue #27774 · matplotlib/matplotlib
X Title: [ENH]: pre-set file name for GUI save dialog in rcParams · Issue #27774 · matplotlib/matplotlib
Description: Problem While there is an obvious way to specify the output image format as well as directory where GUI suggests to export your interactive plot, like this: matplotlib.rcParams["savefig.format"] = "pdf" matplotlib.rcParams["savefig.direc...
Open Graph Description: Problem While there is an obvious way to specify the output image format as well as directory where GUI suggests to export your interactive plot, like this: matplotlib.rcParams["savefig.format"] = ...
X Description: Problem While there is an obvious way to specify the output image format as well as directory where GUI suggests to export your interactive plot, like this: matplotlib.rcParams["savefig.format...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/27774
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ENH]: pre-set file name for GUI save dialog in rcParams","articleBody":"### Problem\r\n\r\nWhile there is an obvious way to specify the _output image format_ as well as *directory* where GUI suggests to export your interactive plot, like this:\r\n\r\n matplotlib.rcParams[\"savefig.format\"] = \"pdf\"\r\n matplotlib.rcParams[\"savefig.directory\"] = ...\r\n\r\nthere is no easy way to suggest the *file base name*, and it always defaults to practically useless \"Figure_1\" or so. \r\n\r\nRationale 1: I often process \u0026 plot a lot of scientific datasets with long names that encode a bunch of useful parameters. My scripts would therefore save me significant amount of time if e.g. for \"abcd123.dat\" they suggested to export into \"abcd123.*\".\r\n\r\nRationale 2: One old question about this can be found on SO (https://stackoverflow.com/questions/41680007/how-to-change-default-filename-from-matplotlib-navigationtoolbar-in-a-pyqt5-appl) and the proposed solution requires monkey-patching Matplotlib functions - which is ugly, tedious and most importantly, the suggested code did not work anymore. \r\n\r\n### Proposed solution\r\n\r\nLet's allow users to change the filename too, allowing one to simply set:\r\n\r\n matplotlib.rcParams[\"savefig.basename\"] = ...","author":{"url":"https://github.com/FilipDominec","@type":"Person","name":"FilipDominec"},"datePublished":"2024-02-12T09:37:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":15},"url":"https://github.com/27774/matplotlib/issues/27774"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e208d8b5-b4b0-1b39-7ab0-62c9062bb65b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 85E0:28D644:C3D516:10743AE:6A52837F |
| html-safe-nonce | f9c4f50c7ea7b6a0e5be7fc0aea7e7665cf356467e5615b5daa99ada76837a99 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NUUwOjI4RDY0NDpDM0Q1MTY6MTA3NDNBRTo2QTUyODM3RiIsInZpc2l0b3JfaWQiOiI0NTc2MTIxOTM4NjUzNjQzNjQ3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2bdc4b0f4c50b1b687424861252f8a611bc82043a8be316ed06d8cb0675f8505 |
| hovercard-subject-tag | issue:2129736992 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/27774/issue_layout |
| twitter:image | https://opengraph.githubassets.com/348c4bac13e24186ecf9816f6092872ae034a849927bddd8d1bc2b8fda8f0120/matplotlib/matplotlib/issues/27774 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/348c4bac13e24186ecf9816f6092872ae034a849927bddd8d1bc2b8fda8f0120/matplotlib/matplotlib/issues/27774 |
| og:image:alt | Problem While there is an obvious way to specify the output image format as well as directory where GUI suggests to export your interactive plot, like this: matplotlib.rcParams["savefig.format"] = ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | FilipDominec |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width