-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Added axes inversion to cla() #8455
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5f03c95
added axes reset to normal order (+x up, +y up)
76bdae4
changed to use set_xlim instead, also added tests
jrmlhermitte 479d68f
PEP8 fix and removed two comments
jrmlhermitte 917de33
added TypeError exception handling to setting x/ylim
jrmlhermitte ab0d228
PEP8 fixes to test_axes.py
jrmlhermitte 8c47c55
removed a trailing whitespace
jrmlhermitte 234695f
added same change to axes3D
jrmlhermitte 76b802d
changed figure cleanup
jrmlhermitte 01ebc98
Also pass on AttributeError
jrmlhermitte 64f80e6
added tests
jrmlhermitte ab310ec
PEP8 fix (for Travis CI)
jrmlhermitte e425eaf
another PEP8 fix for Travis CI
1ae6d9e
moved Axes2D cla to top of Axes3D cla
a2f7ed9
raise AttributeError exception for set_zlim
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
@WeatherGod , curious (but not so important) question. Any reason why we're not using
super(Axes3D, self).cla()
? Since I'm on this line I could change to the newer method. (But I guess we shouldn't care unless we get into MRO details)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 once tried super-fying Axes3D (about 3 years ago). Some weird bugs started happening, so I dropped it. At the time, I was highly inexperienced with super(), so I might have been doing it wrong.
I am a firm believer in keeping PRs orthogonal. If you want to take a crack at super-fying Axes3D, you are more than welcome to try, but do so in a separate PR.
Uh oh!
There was an error while loading. Please reload this page.
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've battled with
super
quite a bit. If there is a bug, it usually has to do with Method Resolution Order (MRO) (I hope...). I think you know that already, but writing it in case anyone else is reading.But that's something you need to worry about only when a class inherits from multiple parents. Multiple inheritance complicates things, if you just try to think about how you would do it if you had to using only
super
, you quickly see it's not that simple (and some convention must be chosen).Also, I'm not sure if MRO changed from python 2x to 3x. I'll do some reading and see if it's worth doing. So I'll give it a shot (and keep it simple), and hope your bugs were to do with MRO...
PS : I think you know all this... but I'm not 100% sure. I remember this was a frustrating thing for me when I was first using multiple inheritance, but it ended up working nicely. So I figured it was worth a small discussion here.