-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
add test_quiver in test_datetime.py #27547
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
base: main
Are you sure you want to change the base?
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 us on gitter for real-time discussion.
For details on testing, writing docs, and our review process, please see the developer guide
We strive to be a welcoming and open project. Please follow our Code 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.
This looks good to me - just need to remove two extra lines and then I can approve it.
x_ranges = np.array(range(threshold)) | ||
y_ranges = np.array(range(threshold)) |
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.
x_ranges = np.array(range(threshold)) | |
y_ranges = np.array(range(threshold)) |
These two lines can be removed as they're duplicates of the two lines above.
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.
Thanks for your reply, I have just removed two extra lines , but the auto-checks seems failed.. it is about Pull Request Labeler / labeler (pull_request_target) , I have tried several times but can't find reasons
Co-authored-by: Elliott Sales de Andrade <[email protected]>
PR summary
I have added a datetime smoketest for Axes.quiver to lib/matplotlib/tests/test_datetime.py. as requested in #26864
It seems like Axes.quiver() allows datatime as the types of parameter X and Y.
I also tested whether U and V can accept the values of the datetime / timedelta, and the answer is no. Firstly, since U and V represent the x and y directional components of the arrow vector, the datetime type seems meaningless. Secondly, after testing, the same bug #27500 will appear, requiring the use of dates.date 2num() for type conversion
(It's my first time actively participating in an open-source project, and I've just opened my first pull request. I've conscientiously adhered to the contributing guidelines throughout the implementation process, and I appreciate your understanding in case of any unintentional mistakes.)
Below is an image of the plot generated from this example code.

PR checklist