-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Remove the 'hold' kwarg from codebase #10485
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
Conversation
lib/matplotlib/pyplot.py
Outdated
|
||
return ret | ||
|
||
# Autogenerated by boilerplate.py. Do not edit as changes will be lost. | ||
@_autogen_docstring(Axes.angle_spectrum) | ||
def angle_spectrum(x, Fs=None, Fc=None, window=None, pad_to=None, sides=None, | ||
hold=None, data=None, **kwargs): | ||
**kwargs): |
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.
Note to future me: the data kwarg shouldn't have gone here, this needs fixing. (or if anyone fancies force pushing a fix to my branch)
0b57492
to
862aba8
Compare
The +/- on this PR is amazing! |
fe078de
to
32b8a0a
Compare
I think this is somewhat covered by #9173, though it's a bit old and has some conflicts. |
32b8a0a
to
2cb27d1
Compare
I'll need to revisit #9173 anyways, so no worries. |
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.
Tests pass now, so I think it is ready to go.
Just needs API changes docs! |
%(ret)s = %(ax)s.%(func)s(%(call)s) | ||
finally: | ||
%(ax)s._hold = %(washold)s | ||
%(ret)s = %(ax)s.%(func)s(%(call)s) |
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.
Even simpler would be to just do return gca().func(...)
, which avoids the need for temporary variables and thus allows you to get rid of the "gensym-like facility" mentioned lower in this script.
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.
👍 the only reason we needed the local reference to the return value was so we could reset the hold.
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.
This all seems good to me. Needs a rebase; Not sure if you wanted to address the few comments below.
Fix data kwarg Fix contour boilerplating Remove last bits of _hold
Still a few fixes applicable but let's get this in first. |
Another step in to the bright new post python 2.7 world, this time removing the
hold
kwarg. As far as I can see I've got rid of all the_hold
instances in the code base. Lets see what happens with the tests...