Thanks to visit codestin.com
Credit goes to github.com

Skip to content

extra label for non-existent tick #5841

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

Closed
anntzer opened this issue Jan 13, 2016 · 3 comments
Closed

extra label for non-existent tick #5841

anntzer opened this issue Jan 13, 2016 · 3 comments
Assignees
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Jan 13, 2016

After

rcParams["xtick.direction"] = rcParams["ytick.direction"] = "out"
xlim(4.001, 8)

There is an extra label at x=4.0, but (correctly) no tick there:
extralabel

Probably a rounding issue, e.g. it doesn't appear using xlim(4.005, 8). I understand that some tolerance in floating point comparison is needed, but at least the same should be used for both ticks and labels (i.e. I wouldn't necessarily consider it a bug if both a tick and a label appeared when the lower xlim is e.g. 4+1e-10).

Sadly not solved by #5768.

PS: I guess this is going to be much more visible now that the default style has ticks pointing outwards...

@tacaswell tacaswell added this to the next major release (2.0) milestone Jan 13, 2016
@mdboom
Copy link
Member

mdboom commented Jan 25, 2016

Some rough notes as we go through: See axis.py:253 for where we determine if things appear or not. I suspect we just need to put the label drawing inside of the if midPoint block as well.

@anntzer
Copy link
Contributor Author

anntzer commented Jan 25, 2016

Your solution seems to work.

@tacaswell
Copy link
Member

Did a PR for this fix ever get created?

@tacaswell tacaswell self-assigned this Feb 1, 2016
@QuLogic QuLogic modified the milestones: 1.5.2 (Critical bug fix release), 2.0 (style change major release) Feb 9, 2016
tacaswell added a commit to tacaswell/matplotlib that referenced this issue May 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants