-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Add test_hlines to test_datetimes.py #27211
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.
I think we also wish to test the xmin
/xmax
as dates here
@ksunden @scottshambaugh could I please have some advice on why the codecov/project/tests check is not passing? It's at 98.76% "compared to a589856" - I don't know why it's comparing this to the test for scatter. |
If anybody is having the same issue, I think it stemmed simply from the fact that my branch was not current with the main body of work. Synchronizing it fixed the issue. |
PR summary
I have added a datetime smoketest for
Axes.hlines
tolib/matplotlib/tests/test_datetime.py
. This example is very similar toAxes.axhline
(#27177) – but to test the entire functionality ofhlines
, I have done a combination of datetime.datetime/np.datetime64 arrays with both scalar and arrayxmin
/xmax
arguments.Below is an image of the plot generated from this example code.
![test_hlines](https://private-user-images.githubusercontent.com/99672198/278464934-ffc93fa6-06b2-45dd-9412-a3d304744915.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgwNTExNzIsIm5iZiI6MTcxODA1MDg3MiwicGF0aCI6Ii85OTY3MjE5OC8yNzg0NjQ5MzQtZmZjOTNmYTYtMDZiMi00NWRkLTk0MTItYTNkMzA0NzQ0OTE1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjEwVDIwMjExMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJmNzI4NWY5YTJiZGZjMTBjNGE1YjVjNjQxZDc3MmI5YTNjMTIyMTI4YjkwYzU2MzY2ZmM2ZDA5NGY2NzRlMTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.bsNT3eOFNeIDFEUNiYfmv5N_RCJDeY9wMVO7kSoLh8g)
This addresses the
Axes.hlines
task from #26864.PR checklist