Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
DOC: Fix example for what's new imshow so it isn't cut off or crowded.#24441
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
DOC: Fix example for what's new imshow so it isn't cut off or crowded.#24441
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Suggest constrained layout and concise date formatter. |
I prefer the concise locator version, but I'm biased... |
stefmolin commentedNov 12, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I'm not going to block on that, but I don't find having 00:00 next to the day all that useful. |
Since this example has so many ticks so close together, I think this helps avoid confusion of the ticks being multiline entries e.g., |
stefmolin commentedNov 13, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Here's theupdated page in the docs. This is also 3.7#22230 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks 👍 - just two non-blocking suggestions. I think that having00:00
next to the date is better than having just the date.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
timhoffm left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Since this is about extents and not about date formatting, I propose to simplify the y ticks further:
- reduce to only one major tick per day (more ticks don't make sense because you have only one image pixel per day)
- thus, also don't activate minor ticks
- set the date format to "%d/%m%y" (no hours)
timhoffm commentedNov 13, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I would even leave out Optional: I also switched the x-extent from [1, 11], to [0, 10] because it looks slightly better to have ticks on the boundaries. But that's just a minor stylistic thing. |
I agree with@timhoffm – I will update the example. |
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
The example for the What's new entry on the

extent
parameter toimshow
currently has a very crowded y-axis and the labels are being cut off:I reduced the number of major ticks and adjusted the figure size in addition to calling

tight_layout()
to fix this. It now looks like the below in thebuilt docs.PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst