Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Cleanup examples#20631
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
Cleanup examples#20631
Uh oh!
There was an error while loading.Please reload this page.
Conversation
42282fc
to269ed42
Compare2addc5b
tob677c24
CompareIs this something we want to do this pervasively? Inever use |
You are right, we did not have a formal decision on this. Maybe we should. At least we have that API and we should consider if it's something that should be promoted.
It now does after#20569. |
I feel like for the docs it's less confusing if properties are set in a consistent way across examples where the property setting isn't the point, and shoving the property setting into a function helps make it kinda of go away. |
I think that the docs should reflect users' typical use cases, and every axisshould have a label. So sure, for highly technical docs where we are doing something completely orthogonal, doing the more mysterious thing is OK. I'm not horrified by
I think the only thing it has going for it is that it is (usually) shorter and can be written in one line. So I'm pretty skeptical of removing it very often or deciding that it is the "preferred" way, if nothing else because of 1. maybe folks can talk about it at the meeting this week (I'll be away, but I'm sure you understand the concerns). |
We had some discussion about this in the dev call (which was only a small group today). The overall consensus is that both the explicit setter functions as well as the batch-set have their merits and are targeted at different use cases / user groups. Ideally, they would be separate API-levels, but that's not the case for historic reasons. It is important to communicate the reasons for both concepts and when to use what. I'll write a tutorial on that, which hopefully gives an understanding and clear directions. Until that's agreed on, I put this PR on hold. |
Let's close this. If we want to pick this up at some point, starting anew will be easier than trying to rebase. |
Uh oh!
There was an error while loading.Please reload this page.
UseMoved toUse set_xticks(ticks, labels) instead of a separate set_xticklabels() #20636 for easier review.set_xticks(positions, labels)
instead ofset_xticks(positions); set_xticklabels(labels)
.ax.set()
instead of multipleset_*
calls when appropritate.