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

added test_axvspan in test.datetime.py#27130

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
scottshambaugh merged 3 commits intomatplotlib:mainfromdanielcobej:add_axvspan
Oct 24, 2023
Merged

added test_axvspan in test.datetime.py#27130

scottshambaugh merged 3 commits intomatplotlib:mainfromdanielcobej:add_axvspan
Oct 24, 2023

Conversation

danielcobej
Copy link
Contributor

@danielcobejdanielcobej commentedOct 18, 2023
edited
Loading

I´ve added code fortest_axvspan method intest_datetime.py mentioned in issue#26864

Image output: (edited)
download

PR summary

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.

Copy link
Member

@ksundenksunden left a comment

Choose a reason for hiding this comment

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

Can you set the random seed so that we get a reproducible result?

(We aren't doing an image test here (yet) but we are likely to make it one at some point, and just having non reproducible test cases can make tracking things down all that much harder)

https://matplotlib.org/stable/devel/testing.html#random-data-in-tests

@danielcobej
Copy link
ContributorAuthor

Can you set the random seed so that we get a reproducible result?

(We aren't doing an image test here (yet) but we are likely to make it one at some point, and just having non reproducible test cases can make tracking things down all that much harder)

https://matplotlib.org/stable/devel/testing.html#random-data-in-tests

I've added seed number19680801

@QuLogicQuLogic mentioned this pull requestOct 18, 2023
64 tasks
)
for i in range(np.random.randint(1, 5)):
xmin = start_date + np.random.randint(0, 30) * time_delta
xmax = xmin + np.random.randint(1, 3) * time_delta
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to my comment on#27139, please use hardcoded values here rather than random draws.


bin_edges = [start_date + i * time_delta for i in range(31)]

fig, (ax1, ax2, ax3) = plt.subplots(3, 1, constrained_layout=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

can shorten tofig, axes = plt.subplots(3, 1, constrained_layout=True), and removeaxes = [ax1, ax2, ax3] below

Copy link
Contributor

@scottshambaughscottshambaugh left a comment

Choose a reason for hiding this comment

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

This looks good to me, thank you for adding this test coverage!

@scottshambaughscottshambaugh merged commitb34e704 intomatplotlib:mainOct 24, 2023
@scottshambaughscottshambaugh added this to thev3.9.0 milestoneOct 24, 2023
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

@ksundenksundenksunden approved these changes

@scottshambaughscottshambaughscottshambaugh approved these changes

Assignees
No one assigned
Projects
Milestone
v3.9.0
Development

Successfully merging this pull request may close these issues.

4 participants
@danielcobej@ksunden@scottshambaugh@melissawm

[8]ページ先頭

©2009-2025 Movatter.jp