-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
FIX: properly handle dates when intmult is true #17727
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
5560a6a
to
5b48457
Compare
Codecov is made because we never call the warning in the tests. I'm not sure what case this would actually get called, but could try if folks think its necessary. |
How pathological of an example do you need to trigger the warning? We have had cases of un-exercised warnings bit-rotting and turning into exceptions due to missing variables / bad formatting / etc so a test would be better, but not if it is going to be a huge amount of work. |
5b48457
to
fed1db7
Compare
OK, this warning comes up if we don't satisfy the maxticks constraint, but then it tells the user to change something they can't change anyhow. I think we should just drop the warning. |
What do you mean? It's an instance attribute. It's even documented in the class docstring. |
Ooops! Fair enough.... |
So what happens here is that there is special logic for the The compromise I reached is to keep the warning in, but exclude checking it for the case of |
80e41a6
to
8e51231
Compare
Added extra test (though there was no test for this warning before) |
03b3d28
to
2fe9d1a
Compare
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.
👍 for the fix, I noticed this funny behavior the other day! Looks like python 3.6 is raising more than 1 warning though.
I just assumed that was a flaky test. Its funny that the test passes py3.6 on Azure, but fails on Travis. I really don't understand what might be different. py test versions?
|
This test only fails on python 3.6 on Travis with
I'm completely befuddled by this, as the same machinery is used elsewhere in this file with no problem. |
Print all the values in matplotlib/lib/matplotlib/testing/__init__.py Lines 34 to 42 in 45d27c9
|
Trying that now. Not sure how you knew that might be the problem, but... I'm still not clear why that would only affect this one test set up... |
It's the only warning I know of that sometimes happens in containers; may or may not be the actual problem though. |
Not quite as I guessed:
I suggest using |
fe61d62
to
78a4234
Compare
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
f9c895f
to
c8c9254
Compare
Took the liberty of re-basing. |
Anyone can merge on green. |
PR Summary
Currently, if interval_multiples=True (now the default), and a long enough numbers of days is being plotted, the locator finds the 1st and 22nd of the month as dates. That makes sense if interval_multiples=False, but is silly for interval_multiples=True.
picks dates 1, and 22 of the month. This PR fixes that to be 1 and 15, and to not raise a warning:
Before
After
PR Checklist