Add test_boxplot to test_datetime.py#27502
Add test_boxplot to test_datetime.py#27502shriyakalakata wants to merge 1 commit intomatplotlib:mainfrom
Conversation
|
This does not accomplish what I was saying in that comment... If we were to decide to "apply statistics after converting units" (which I stated that I could make an argument for, but not that I actually thought it was the best option) that would have to be a change to how The statement about statistics plots (broadly) applying to physical units is to say I think it makes sense to have a boxplot that shows, e.g. "length in meters". This is not something we have built into our public interface (though we do have some forms of it in examples/other tests, and there is support for e.g. pint to interplay with mpl). This is even if it doesn't make sense for datetimes. It was more of a question than a final decision... Further, there is already a PR that addresses this portion of #26864, #27038. In general our preference is to work with the first submitter of a similar PR, and to maintain authorship when a PR is built upon. I see that you commented there, though in general our preference is to at least provide the opportunity for the original submitter to respond. |
|
Ah I see, ok. Thank you for explaining it further. I will keep that in mind. |
PR summary
I have added a datetime smoke test/example code under the test_boxplot method in lib/matplotlib/test/test_datetime.py. This addresses the Axes.boxplot task from #26864.
Here, since the statistical measures in boxplots don't translate well to dates, we convert dates to physical units.
(Using advice from @ksunden 's comment on #27485)
The plots generated from the latest test code:

PR checklist