Skip to content
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

Add scatter test for datetime units #26882

Merged
merged 10 commits into from
Oct 18, 2023
Merged

Conversation

seohyeonlee2020
Copy link
Contributor

@seohyeonlee2020 seohyeonlee2020 commented Sep 22, 2023

PR summary

Closes issue #26864
added 3 subplots with datetime array on the x axis, y axis, and both axes.

PR checklist

added 3 subplots with datetime array on the x axis, y axis, and both axes.
@tacaswell tacaswell added this to the v3.9.0 milestone Sep 22, 2023
Copy link

@github-actions github-actions bot 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 us on gitter for real-time discussion.

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

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

@seohyeonlee2020
Copy link
Contributor Author

I incorporated the issues you mentioned in my 2nd commit.

@seohyeonlee2020
Copy link
Contributor Author

output

lib/matplotlib/tests/test_datetime.py Outdated Show resolved Hide resolved
lib/matplotlib/tests/test_datetime.py Outdated Show resolved Hide resolved
Comment on lines 294 to 297
# rotate labels so they don't look clogged
for label in axs[0].get_xticklabels():
label.set_rotation(40)
label.set_horizontalalignment('right')
Copy link
Member

Choose a reason for hiding this comment

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

With a shorter array, this might not be necessary; would have to see what it looks like then.

@seohyeonlee2020
Copy link
Contributor Author

output2

I needed to rotate axis labels because they were still clogged after I reduced array length
np.random.seed(19680801)
y = np.cumsum(np.random.randn(N))
fig, axs = plt.subplots(3, 1, layout='constrained', figsize=(6, 6))
lims = [(np.datetime64('2005-02'), np.datetime64('2005-04')),
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't look like lims is used

@scottshambaugh
Copy link
Contributor

Thank you for the contribution! I noted one thing to clean up but it looks generally good to me.

A note for whoever merges this, it closes the "Axes.scatter" item of #26864, not the whole ticket.

eliminated unused variable according to feedback ('lims')
@seohyeonlee2020
Copy link
Contributor Author

I deleted lims in my most recent pull request. Please review my request again.

@QuLogic QuLogic changed the title wrote test_scatter Add scatter test for datetime units Oct 18, 2023
@QuLogic QuLogic merged commit a589856 into matplotlib:main Oct 18, 2023
40 checks passed
@QuLogic
Copy link
Member

QuLogic commented Oct 18, 2023

Thanks @seohyeon-lee-2025! Congratulations on your first PR to Matplotlib 🎉 We hope to hear from you again.

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.

None yet

6 participants