-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add datetime testing for boxplot #27038
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.
We'd prefer to use the axes interface over the plt
methods for this test.
Also I'd like to see another axes that shows a vert=False
boxplot to make sure that the unit handling works for horizontal boxplots.
Could also argue for positions
to be given as datetimes (in another plot...) to make sure that it handles that as well.
datums = np.array([datetime.datetime.toordinal(d) for d in data]) | ||
plt.boxplot(datums, labels=['my data'], showfliers=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.
datums = np.array([datetime.datetime.toordinal(d) for d in data]) | |
plt.boxplot(datums, labels=['my data'], showfliers=True) | |
plt.boxplot(data, labels=['my data'], showfliers=True) |
We actually very specifically want the datetimes passed into the plotting methods here. as it stands, this test is not actually testing the unit conversion at all.
Since this PR has been inactive for over two months, can I create a new PR using advice from the comment on #27485 : "I think it could translate well to physical units, so perhaps we should make it so that at least we try to adhere to the units behavior..." |
PR summary
I have added the code corresponding screenshots for the boxplot testing function in test_datetime.py file. and completed the portion for Axes.boxplot of issue #26864"

this is the screenshot of boxplot by given code..
-->
PR checklist