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

Improve docstring of draw_idle()#12521

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

Merged
NelleV merged 1 commit intomatplotlib:masterfromtimhoffm:doc-draw-idle
Oct 20, 2018

Conversation

timhoffm
Copy link
Member

@timhoffmtimhoffm commentedOct 13, 2018
edited
Loading

PR Summary

Trying to improve the docstring ofdraw_idle(). Though I'm not sure what exactly its pupose is and when it should be used. Can someone with more experience on the internals comment on this please?

@anntzer
Copy link
Contributor

Should be something like

        Request a widget redraw once control returns to the GUI event loop.        Even if multiple calls to `draw_idle` occur before control        returns to the GUI event loop, (backends should arrange that)        the figure will only be rendered once.

where the parenthesis depends on whether you're writing the docs for backend implementers or for end users.

@timhoffm
Copy link
MemberAuthor

Thanks. IMO the main audience of the docs are the end users. I've dropped the parenthesis but left my note instead. That keeps the information in but a bit separated.

Btw. can we make a suggestion to the end-user if she should calldraw() ordraw_idle()? We have both cases quite mixed in the examples.

@ImportanceOfBeingErnest
Copy link
Member

ImportanceOfBeingErnest commentedOct 14, 2018
edited
Loading

If the draw event happens inside the event loop one should definitely calldraw_idle(). Actually I think my very first PR here was about exactly that (#9064). If no event loop has been started,draw_idle() potentially has no effect.
There is also#5800, which suggests there actually is a drawback from calling it with non-GUI backends.

Copy link
Member

@NelleVNelleV left a comment

Choose a reason for hiding this comment

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

Thanks@timhoffm !

@NelleVNelleV merged commit0ca0c40 intomatplotlib:masterOct 20, 2018
@timhoffmtimhoffm deleted the doc-draw-idle branchOctober 20, 2018 19:20
@QuLogicQuLogic added this to thev3.1 milestoneOct 20, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@NelleVNelleVNelleV approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.1.0
Development

Successfully merging this pull request may close these issues.

5 participants
@timhoffm@anntzer@ImportanceOfBeingErnest@NelleV@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp