Added test_loglog in test_datetime.py by dchen2438 · Pull Request #27435 · matplotlib/matplotlib · GitHub
Skip to content

Added test_loglog in test_datetime.py - #27435

Open
dchen2438 wants to merge 1 commit into
matplotlib:mainfrom
dchen2438:test_loglog
Open

Added test_loglog in test_datetime.py#27435
dchen2438 wants to merge 1 commit into
matplotlib:mainfrom
dchen2438:test_loglog

Conversation

@dchen2438

@dchen2438 dchen2438 commented Dec 4, 2023

Copy link
Copy Markdown

PR summary

Added the test_loglog method in test_datetime.py
This PR is for Axes.loglog in #26864

image

PR checklist

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

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.

@ksunden

ksunden commented Dec 4, 2023

Copy link
Copy Markdown
Member

@jklymak

jklymak commented Dec 4, 2023

Copy link
Copy Markdown
Member
mpl.rcParams["date.converter"] = 'concise'
fig, (ax1, ax2, ax3) = plt.subplots(3, 1, layout='constrained')
x = np.arange(np.datetime64('2015-12-01'), np.datetime64('2023-12-06'))
y = 10 ** np.linspace(0, 4, len(x))
ax1.loglog(x, y)
ax2.loglog(y, x)
ax3.loglog(x, x)

As @ksunden points out, this is hardly great for larger time spans, with minor ticks being mislabeled.

boo

OTOH, it doesn't spit out an error message, so maybe thats OK for the purposes of these smoke tests?

@dchen2438

Copy link
Copy Markdown
Author

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

Projects

Status: Needs review

Development

Successfully merging this pull request may close these issues.

5 participants