Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion lib/matplotlib/backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -1893,7 +1893,16 @@ def draw(self, *args, **kwargs):

def draw_idle(self, *args, **kwargs):
"""
:meth:`draw` only if idle; defaults to draw but backends can override
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, the figure will only be rendered once.

Note
----
Backends may choose to override the method and implement their own
strategy to prevent multiple renderings.

"""
if not self._is_idle_drawing:
with self._idle_draw_cntx():
Expand Down