Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Added smoke test for Axes.stem #27135

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

Merged
merged 7 commits into from
Dec 5, 2023
Merged

Added smoke test for Axes.stem #27135

merged 7 commits into from
Dec 5, 2023

Conversation

0taj
Copy link
Contributor

@0taj 0taj commented Oct 18, 2023

PR summary

Smoke test for Axes.stem using datetime data in lib/matplotlib/tests/test_datetime.py. This PR addresses one of the tasks listed in #26864

The image displays the plot of the test case:
stem_smoke_test

PR checklist

@0taj
Copy link
Contributor Author

0taj commented Oct 18, 2023

I see that I need to reformat the code, but I was wondering if the test case handles the required task as this is one of my first PRs

Copy link
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.

Please add a bottom argument to avoid the implicit 1970-01-01 of this method (and exercise that part of the code) (There is also a chance this is broken already, so if it is, that should be reported)

Also please test both vertical and horizontal orientations, as we want to make sure we don't miss that from this method.

@QuLogic
Copy link
Member

QuLogic commented Oct 18, 2023

Probably should set some of the dates to be below bottom as well.

@0taj
Copy link
Contributor Author

0taj commented Oct 19, 2023

Here is also the updated figure. Sorry if there are still some mistakes but if there are any other changes that need to be made I will make those as well!
Figure_1

@0taj 0taj requested a review from ksunden October 21, 2023 04:45
Copy link
Contributor Author

@0taj 0taj left a comment

Choose a reason for hiding this comment

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

The changes have been fixed

fig, (ax1, ax2, ax3, ax4, ax5, ax6) = plt.subplots(6, 1, layout="constrained")

limit_value = 10
above = datetime.datetime(2100, 10, 18)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should the value of these dates be changed?

Copy link
Member

Choose a reason for hiding this comment

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

I think so, I think so, the far off dates obscure what is actually being plotted, in my opinion

@0taj
Copy link
Contributor Author

0taj commented Oct 25, 2023

Here is the plot with the updated dates
test_stem

@ksunden ksunden added this to the v3.9.0 milestone Oct 26, 2023
@0taj 0taj requested a review from QuLogic October 30, 2023 04:56
Copy link
Member

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

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

Sorry for the delay coming back to this.

@QuLogic QuLogic merged commit 273a268 into matplotlib:main Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants