Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add test_vlines to test_datetime.py#27410

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
QuLogic merged 1 commit intomatplotlib:mainfrommadisonwong210:test_vlines
Dec 6, 2023

Conversation

madisonwong210
Copy link
Contributor

@madisonwong210madisonwong210 commentedNov 30, 2023
edited
Loading

PR summary

I have added a datetime smoke test forAxes.vlines inlib/matplotlib/tests/test_datetime.py. It includes a combination of dates and floats for the axes as well as scalars and arrays for ymin and ymax.
This addresses theAxes.vlines task from#26864.

Here is an image of the plots:
Screenshot 2023-12-01 at 12 34 48 PM

PR checklist

Copy link

@github-actionsgithub-actionsbot left a comment

Choose a reason for hiding this comment

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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join uson gitter for real-time discussion.

For details on testing, writing docs, and our review process, please seethe developer guide

We strive to be a welcoming and open project. Please follow ourCode of Conduct.

@madisonwong210madisonwong210force-pushed thetest_vlines branch 2 times, most recently frome5b99f1 to00c8072CompareDecember 1, 2023 01:07
@madisonwong210madisonwong210force-pushed thetest_vlines branch 3 times, most recently froma2252b7 toc543e4fCompareDecember 2, 2023 03:16
ymax=[np.datetime64('2023-05-01'), np.datetime64('2023-05-16')])
ax3.set_xlim(left=datetime.datetime(2023, 7, 1),
right=datetime.datetime(2023, 12, 31))
ax3.vlines(x=[datetime.datetime(2023, 9, 1), datetime.datetime(2023, 12, 10)],
Copy link
Member

Choose a reason for hiding this comment

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

Any reason not to re-usedates on this one?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I wanted to make each graph look fairly different from one other, so I tried to pick different dates and x/y limits. Initially, thedates array was too long to fit on one line which is why I made it a separate variable. If you'd prefer I re-use it, I can make the change but would have to modify the x limit as well because the values indates fall outside of the current range for ax3. Let me know what you think

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Alternatively, I could get rid ofdates altogether and move the array directly intoax1.vlines() but keep each element on a different line like it is right now

Copy link
Member

Choose a reason for hiding this comment

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

Yea, I think it'd be clearer to not havedates if it's not being reused in other places with dates.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Got it. Just fixed it

@QuLogicQuLogic mentioned this pull requestDec 5, 2023
64 tasks
@QuLogicQuLogic added this to thev3.9.0 milestoneDec 6, 2023
@QuLogicQuLogic merged commit3b23925 intomatplotlib:mainDec 6, 2023
@QuLogic
Copy link
Member

Thanks@madisonwong210! Congratulations on your first PR to Matplotlib 🎉 We hope to hear from you again.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@github-actionsgithub-actions[bot]github-actions[bot] left review comments

@QuLogicQuLogicQuLogic approved these changes

@ksundenksundenksunden approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.9.0
Development

Successfully merging this pull request may close these issues.

3 participants
@madisonwong210@QuLogic@ksunden

[8]ページ先頭

©2009-2025 Movatter.jp