Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed
timhoffm wants to merge1 commit intomatplotlib:mainfromtimhoffm:cleanup-examples
Closed

Conversation

timhoffm
Copy link
Member

@timhoffmtimhoffm commentedJul 11, 2021
edited
Loading

@timhoffmtimhoffmforce-pushed thecleanup-examples branch 3 times, most recently from42282fc to269ed42CompareJuly 12, 2021 06:41
@timhoffmtimhoffmforce-pushed thecleanup-examples branch 3 times, most recently from2addc5b tob677c24CompareJuly 12, 2021 21:31
@jklymak
Copy link
Member

Is this something we want to do this pervasively? Inever useax.set, though I suppose I could get in the habit, but I'm not sure if I think its good style or not. It certainly does not tab-complete because the arguments are just**kwargs. (Sorry for the noise if this was a decision already decided on)

@timhoffm
Copy link
MemberAuthor

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.
I find batch-setting worthwile. Kwargs often used in more modern plot tools. Personally, I find the compact notation better than having lots ofax.set_* calls.

It certainly does not tab-complete because the arguments are just**kwargs.

It now does after#20569.

story645 reacted with thumbs up emoji

@story645
Copy link
Member

Is this something we want to do this pervasively?

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.

@jklymak
Copy link
Member

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 byax.set(xlabel='my xlabel', ylabel='my ylabel') but

  1. it isnot as flexible (you can't pass any of the optional kwargs),
  2. it is not as intuitive to explain to new users,
  3. it is not as searchable (either in the docs or on the internet), and
  4. it does not tab complete the same way asax.set_x... does.

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).

@timhoffmtimhoffm marked this pull request as draftJuly 15, 2021 20:49
@timhoffm
Copy link
MemberAuthor

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.

jklymak reacted with thumbs up emoji

@timhoffm
Copy link
MemberAuthor

Let's close this. If we want to pick this up at some point, starting anew will be easier than trying to rebase.

@timhoffmtimhoffm deleted the cleanup-examples branchJuly 19, 2024 11:35
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@timhoffm@jklymak@story645

[8]ページ先頭

©2009-2025 Movatter.jp