Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
added test_axvspan in test.datetime.py#27130
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join uson gitter for real-time discussion.
For details on testing, writing docs, and our review process, please seethe developer guide
We strive to be a welcoming and open project. Please follow ourCode of Conduct.
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.
Can you set the random seed so that we get a reproducible result?
(We aren't doing an image test here (yet) but we are likely to make it one at some point, and just having non reproducible test cases can make tracking things down all that much harder)
https://matplotlib.org/stable/devel/testing.html#random-data-in-tests
I've added seed number |
) | ||
for i in range(np.random.randint(1, 5)): | ||
xmin = start_date + np.random.randint(0, 30) * time_delta | ||
xmax = xmin + np.random.randint(1, 3) * time_delta |
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.
Similar to my comment on#27139, please use hardcoded values here rather than random draws.
bin_edges = [start_date + i * time_delta for i in range(31)] | ||
fig, (ax1, ax2, ax3) = plt.subplots(3, 1, constrained_layout=True) |
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.
can shorten tofig, axes = plt.subplots(3, 1, constrained_layout=True)
, and removeaxes = [ax1, ax2, ax3]
below
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.
This looks good to me, thank you for adding this test coverage!
Uh oh!
There was an error while loading.Please reload this page.
I´ve added code for
test_axvspan
method intest_datetime.py
mentioned in issue#26864Image output: (edited)

PR summary
PR checklist