Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
ENH: offset parameter for MultipleLocator#25542
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
0d93384
to8796a8c
CompareI pushed a change without rebasing just to see what Mypy would do. It's running.... |
8796a8c
tof386f33
Compare@ksunden could you help me decipher this Mypy failure? |
@@ -53,7 +53,7 @@ def setup(ax, title): | |||
# Index Locator | |||
setup(axs[4], title="IndexLocator(base=0.5, offset=0.25)") | |||
axs[4].plot(range(0, 5),[0]*5, color='white') | |||
axs[4].plot([0]*5, color='white') |
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.
It's not completely obvious from looking at this example what the difference is betweenMultipleLocator
andIndexLocator
. But from theAPI docs it seems to me thatIndexLocator
makes most sense when the axis does not have numbers associated with it. So I took out the x-values.
I clearly should have done more homework before the Thursday call, then I would have known thatoffset is already used as a locator param 🤦♀️
a6782e7
to8c720a9
Compare8c720a9
toad37187
CompareUh oh!
There was an error while loading.Please reload this page.
I think this is now ready for review. I have not [yet] added a what's new entry, as I'm still pretty unclear in general what the criteria are for deciding to do so. |
(I happened to readhttps://matplotlib.org/stable/devel/coding_guide.html#new-features-and-api-changes the other day...) Parameter makes sense! (Will review code when I have a bit more time.) |
Yes this should definitely get what's new entry |
1b82ad2
to9ae5834
CompareOK thanks. What's new now added. |
Co-authored-by: Ruth Comer 10599679+rcomer@users.noreply.github.com
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
Picked up from#21168. Adds anoffset parameter to
MultipleLocator
so the ticks can all be shifted by a given value.### To Do1. Agree whetheroffset is the best name for the new parameter.2. Address documentation tasks in the below checklist, but I wanted to get feedback on the principle and the parameter name before I went all in.PR Checklist
Documentation and Tests
pytest
passes)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