-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Use FixedFormatter only with FixedLocator #15507
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
Conversation
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
Seems reasonable, but fails 15 tests!
@timhoffm
timhoffm
force-pushed
the
fixed-formatter
branch
from
October 27, 2019 15:43
63bf548
to
27df784
Compare
@timhoffm
timhoffm
force-pushed
the
fixed-formatter
branch
2 times, most recently
from
October 27, 2019 21:02
4f9a9fe
to
332cb4a
Compare
jklymak
jklymak
reviewed
Oct 31, 2019
@timhoffm
timhoffm
force-pushed
the
fixed-formatter
branch
from
November 1, 2019 08:50
332cb4a
to
88d178d
Compare
TypeError: _warn_external() got an unexpected keyword argument 'stacklevel'
😉
@timhoffm
timhoffm
force-pushed
the
fixed-formatter
branch
from
November 1, 2019 14:12
88d178d
to
c779568
Compare
jklymak
jklymak
reviewed
Nov 1, 2019
@timhoffm
timhoffm
force-pushed
the
fixed-formatter
branch
2 times, most recently
from
November 1, 2019 17:39
578236a
to
29b63c7
Compare
jklymak
jklymak
approved these changes
Nov 1, 2019
anntzer
anntzer
reviewed
Dec 2, 2019
anntzer
anntzer
previously approved these changes
Dec 2, 2019
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.
just one nit
@timhoffm
timhoffm
force-pushed
the
fixed-formatter
branch
from
December 2, 2019 17:46
29b63c7
to
d538802
Compare
anntzer
anntzer
reviewed
Dec 2, 2019
@anntzer
anntzer
dismissed
their stale review
December 2, 2019 18:30
actually a real (minor) thing to fix on the warning too
@timhoffm
timhoffm
force-pushed
the
fixed-formatter
branch
2 times, most recently
from
December 3, 2019 05:17
8481e72
to
a473ba1
Compare
@timhoffm
timhoffm
force-pushed
the
fixed-formatter
branch
from
December 3, 2019 17:20
a473ba1
to
4b5284f
Compare
Ping @anntzer warning fixed.
anntzer
anntzer
approved these changes
Dec 30, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Summary
This PR prevents users from stumbling into #7122, #8779, #15501.
It does not technically fix them,
FixedFormatter
has a one-off bug with locators other thanFixedLocator
. But setting fixed labels at unknown positions is anyway not a good idea. So even if the one-off bug was fixedFixedFormatter
should only used withFixedLocator
.FixedFormatter
should not be used without aFixedLocator
(along the hierarchy of tick label setter methods).set_major/minor_formatter()
if aFixedFormatter
is set without aFixedLocator
. This may be debatable.One could set the formatter first and the locator afterwards, which would technically yield the correct result. However, I feel that setting the position first and the labels second is the natural way, and is actually done throughout the library.
No alternative: Since Formatters don't know about Locators
FixedFormatter
itself cannot check at runtime and we have to resort to this somewhat clumsy approach.And I strongly want some feedback on this potential problem from running code, because nobody reads the docs 😄.