-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix lost ticks #1686
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
Fix lost ticks #1686
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
255f213
Added a strategy to stop losing ticks on the ends of an axis. The ap…
4c0f3f3
Modifications to MultipleLocator and LogLocator, so that the locators…
63a40e4
oops, missed a return statement in my copy/pasting.
1f3959d
Fixed two of the failing tests for this "Fix lost ticks" branch, and …
a0a7998
Fix the nose failure for polar plots; don't try to pad the interval for
82db1d6
Since the _get_pixel_distance_along_axis routine is supposed to retur…
e2a6f92
PEP8 fixes/protection try/except
dhyams c1b9886
PEP8 fixes.
dhyams 43929de
more PEP8 fixes.
dhyams 36ce184
More PEP8 fixes and comments
7e608d4
Pixel perturbation is now 0.5, for a more accurate calculation of exa…
3cf7ea5
Added a comment about the try/except block that catches malfunctions in
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
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.
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 don't really like this approach. What if I wanted to implement my own projection and it didn't even have an inverted data transformation? The safer, though perhaps not best, option would be to make sure
self.axes
were rectangular (I'd be happy with that).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.
Hmm; I think the approach is correct here...the only problem with the polar projection is the singularity at r=0, which is why it is specifically exempted. The code should activate for everything else.
As for not having an inverted transformation, would that even make sense? Not being able to go from pixel coordinates to data coordinates? Seems like there would be quite a few other things that would break in that situation; not just this.
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 think @pelson's point might be that it's not a great idea to single out a particular projection here -- the user can install and use any number of projections. I haven't given it much thought, but it would be great to find a way to detect this case other than just checking for polar.
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 singling out, though, is for the one projection that I know it doesn't work for. It should work for others, but just for safety, in the latest commits, I wrapped a try/except around each call that gets the amount of padding to use, which defaults the padding to zero in the case of a problem. This recovers old matplotlib behavior.