Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
ENH: Use rcParams savefig.directory on macosx backend#22180
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
@@ -104,10 +106,15 @@ def remove_rubberband(self): | |||
self.canvas.remove_rubberband() | |||
def save_figure(self, *args): | |||
directory = os.path.expanduser(mpl.rcParams['savefig.directory']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Is it possible to add a smoke test for this in the tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Unfortunately I think this is another PR that would be quite hard to add a test for because it is using the GUI :( I did a global search and didn't see any of the other backends testing this either...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I take that back, I just pushed up a test to hijack the GUI function and return a well-defined string instead. Ithink that should get codecov for the Python branches at least... Still not testing the Objective-C updates, but better than nothing?
647451d
tobd7d627
CompareUh oh!
There was an error while loading.Please reload this page.
This adds the rcParams savefig.directory option into the macosxbackend for the savefig dialog window.
Uh oh!
There was an error while loading.Please reload this page.
Ping for a review from any mac users that want to test this out. |
@dstansby / mac users, reminder for another review on this one as well.
|
PR Summary
This adds the rcParams savefig.directory option into the macosx
backend for the savefig dialog window.
Additionally cleans up some of the UTF8 string allocations in this code block.
Closes#21710
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).