-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Transparent rcparams #2390
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
Transparent rcparams #2390
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -563,7 +563,9 @@ def draw(): | |
@docstring.copy_dedent(Figure.savefig) | ||
def savefig(*args, **kwargs): | ||
fig = gcf() | ||
return fig.savefig(*args, **kwargs) | ||
res = fig.savefig(*args, **kwargs) | ||
draw() # need this if 'transparent=True' to reset colors | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I understand why this is needed. Forgetting the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is only tangentally related to the rcParams work. I noticed while testing with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not that comfortable with this change. A quicker alternative might be to capture a frame buffer and fire it back at the canvas. @mdboom do you have any insight? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be better to use |
||
return res | ||
|
||
|
||
@docstring.copy_dedent(Figure.ginput) | ||
|
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.
Since this is actually a new feature, it should probably be added to whats_new.rst as well.
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.
done.