Add datetime testing for boxplot#27038
Add datetime testing for boxplot#27038ayushrathore111 wants to merge 2 commits intomatplotlib:mainfrom
Conversation
ksunden
left a comment
There was a problem hiding this comment.
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.
| 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