-
-
Notifications
You must be signed in to change notification settings - Fork 7.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 our terms of service and privacy 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
Conversation
Suggest constrained layout and concise date formatter. |
I prefer the concise locator version, but I'm biased... |
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., |
Here's the updated 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 having 00:00
next to the date is better than having just the date.
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)
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. |
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 the built 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