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

Use explicit kwarg for plt.show()#11170

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
dstansby wants to merge3 commits intomatplotlib:masterfromdstansby:show-kwarg

Conversation

dstansby
Copy link
Member

I feel like this might be a Bad Idea, but can't work out why - maybe others will be able to tell me if it is or not! Either way, the doc change is probably welcome.

Will add API notes if/when someone reviews.

@dstansbydstansby added this to thev3.0 milestoneMay 4, 2018
"""
global _show
return _show(*args, **kw)
return _show(block=True)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I guess you meanreturn _show(block=block) here?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

🤦‍♂️

@ImportanceOfBeingErnest
Copy link
Member

I do think it's a good idea. Maybe one could even check forblock being a boolean. You won't believe how many people try to do things likeplt.show(fig1),plt.show(ax) etc. Showing a useful error in such cases may be helpful for them.

@ImportanceOfBeingErnest
Copy link
Member

Apparently there is a problem with the web backend which doesn't take any arguments.

@dstansbydstansbyforce-pushed theshow-kwarg branch 2 times, most recently fromb8806d5 tod4d80e5CompareMay 5, 2018 09:40
@@ -319,7 +319,10 @@ def trigger_manager_draw(manager):
manager.canvas.draw_idle()

@staticmethod
def show():
def show(block=True):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I thought we fixed this already....

@tacaswell
Copy link
Member

I am 👎 on changing the default value. If the user passedblock=True we should block unconditionally on any other state.

I am very 👍 on@ImportanceOfBeingErnest 's suggestion of giving a good warning in the common incorrect use of passing figures or axes toplt.show (whichdoes make sense in a guessing-the-API mode).

Copy link
Member

@tacaswelltacaswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👎 on changing the default.

If the user passesblock=True we need to block!

@dstansby
Copy link
MemberAuthor

dstansby commentedMay 7, 2018
edited
Loading

Is there currently a difference betweenblock=None andblock=True in terms of behaviour? I thought they were the same, but maybe not.

@ImportanceOfBeingErnest
Copy link
Member

Concerningblock=True in the webbackend:#11201

@dstansby
Copy link
MemberAuthor

Going to close this since I can't remember what's going on.

@tacaswelltacaswell removed this from thev3.0 milestoneJun 28, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ImportanceOfBeingErnestImportanceOfBeingErnestImportanceOfBeingErnest left review comments

@tacaswelltacaswelltacaswell requested changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@dstansby@ImportanceOfBeingErnest@tacaswell@jklymak

[8]ページ先頭

©2009-2025 Movatter.jp