X Tutup
Skip to content

Add datetime testing for boxplot#27038

Closed
ayushrathore111 wants to merge 2 commits intomatplotlib:mainfrom
ayushrathore111:main
Closed

Add datetime testing for boxplot#27038
ayushrathore111 wants to merge 2 commits intomatplotlib:mainfrom
ayushrathore111:main

Conversation

@ayushrathore111
Copy link
Copy Markdown

@ayushrathore111 ayushrathore111 commented Oct 9, 2023

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..
boxplot_final

-->

PR checklist

Copy link
Copy Markdown
Member

@ksunden ksunden left a 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.

Comment on lines +97 to +98
datums = np.array([datetime.datetime.toordinal(d) for d in data])
plt.boxplot(datums, labels=['my data'], showfliers=True)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

@shriyakalakata
Copy link
Copy Markdown
Contributor

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..."

@melissawm
Copy link
Copy Markdown
Member

Hi all, is there a way forward here? Thanks!

@melissawm melissawm moved this from Needs review to Needs decision in First Time Contributors Mar 12, 2026
@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Mar 18, 2026

It doesn't appear that the original contributor has worked on #27038 (comment); it may be time to close this PR?

@melissawm
Copy link
Copy Markdown
Member

@ayushrathore111 since we haven't seen any movement in this PR for a while, I'll go ahead and close. We understand life is busy and you may be focusing on other work. We can always reopen this PR or you can try with a new one. Cheers!

@melissawm melissawm closed this Mar 18, 2026
@github-project-automation github-project-automation bot moved this from Needs decision to Done in First Time Contributors Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

6 participants

X Tutup