This is equivalent to calling fig.canvas.draw_idle(), where fig is the current figure.
To me, draw sounds a synchronous behavior, whereas draw_idle sounds like an asynchronous behavior. I think this statement of equivalence is confusing, because it claims what sounds to me like two different behaviors, are actually the same.
Can we elaborate on the equivalence, perhaps making it more clear what draw_idle means?
Also, on that page, can we link to the docs for draw_idle (if there are docs on it)?
Suggested improvement
I am not familiar with matplotlib enough to make a quality suggestion here.
The core of the problem is "draw" is a good name for things (short, clear, well known, good analogy) which is why we use it in 3 non-interchangable places.
Artist.draw(renderer) https://matplotlib.org/stable/api/_as_gen/matplotlib.artist.Artist.draw.html which is the visitor-pattern method we call as we cascade down the artist tree when rendering the Figure. This is a method on every Ariist and is probably the most non-negotiable part of the API that makes an object a valid artist (in practice there are like a dozen methods we use, but I think all of those could be made optional)
plt.draw() which is an "application" level tool aimed at people working in a prompt. In this case we are assuming something is managing the GUI event loop and watching if the figures are stale so to get a rerendering that the user can see, all we have to do is mark is request a draw_idle
In addition to the two library level methods there are "lazy" pairs:
fig.draw_without_rendering() https://matplotlib.org/stable/api/figure_api.html#matplotlib.figure.Figure.draw_without_rendering which is only on Figure objects which will walk the draw tree and turn the crank on all of the Matplotlib side things (doing deferred limit updates etc), but will not actually generate any output (it does this by using the normal Figure.draw with a no-op renderer)
The core of the problem is "draw" is a good name for things (short, clear, well known, good analogy) which is why we use it in 3 non-interchangable places.
Artist.draw(renderer) matplotlib.org/stable/api/_as_gen/matplotlib.artist.Artist.draw.html which is the visitor-pattern method we call as we cascade down the artist tree when rendering the Figure. This is a method on every Ariist and is probably the most non-negotiable part of the API that makes an object a valid artist (in practice there are like a dozen methods we use, but I think all of those could be made optional)
plt.draw() which is an "application" level tool aimed at people working in a prompt. In this case we are assuming something is managing the GUI event loop and watching if the figures are stale so to get a rerendering that the user can see, all we have to do is mark is request a draw_idle
In addition to the two library level methods there are "lazy" pairs:
fig.draw_without_rendering() matplotlib.org/stable/api/figure_api.html#matplotlib.figure.Figure.draw_without_rendering which is only on Figure objects which will walk the draw tree and turn the crank on all of the Matplotlib side things (doing deferred limit updates etc), but will not actually generate any output (it does this by using the normal Figure.draw with a no-op renderer)
For the solution of create a xref link from fig.canvans.draw_idle, I think put a "See Also" section underneath with draw_idle and keep origin would be a better choice? I checked around but don't think sphinx provide a way to make a reference with customed code segment. At the sametime, only saying draw_idle or saying backend_bases.FigureCanvasBase.draw_idle will confuse the audience who is visiting this page.
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
Note: renaming is a bit more tricky, as this is Backend API, so we'd have to check for downstream backends whether they define the new or old method and call it appropriately. Not that it's not doable, but one needs to take some extra care.
Activity
tacaswell commented on Dec 2, 2022
The simplest fix is that we should be using a xref there instead of a code literal https://matplotlib.org/stable/api/backend_bases_api.html#matplotlib.backend_bases.FigureCanvasBase.draw_idle.
The core of the problem is "draw" is a good name for things (short, clear, well known, good analogy) which is why we use it in 3 non-interchangable places.
In addition to the two library level methods there are "lazy" pairs:
hukaidong commented on Dec 2, 2022
For the solution of create a xref link from fig.canvans.draw_idle, I think put a "See Also" section underneath with draw_idle and keep origin would be a better choice? I checked around but don't think sphinx provide a way to make a reference with customed code segment. At the sametime, only saying draw_idle or saying backend_bases.FigureCanvasBase.draw_idle will confuse the audience who is visiting this page.
github-actions commented on Jan 26, 2026
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
timhoffm commented on Jan 26, 2026
Semi-OT: Is it worth renaming draw_idle? I'm also confused by the many draw semantics everytime I look into this. Alternatives could be:
draw_idle would then be discouraged, but not plan for removal.
jamesbraza commented on Jan 26, 2026
I like schedule_ or request_ -- much clearer and intuitive. The concept of "idle" is muddled a bit imo
timhoffm commented on Feb 8, 2026
Note: renaming is a bit more tricky, as this is Backend API, so we'd have to check for downstream backends whether they define the new or old method and call it appropriately. Not that it's not doable, but one needs to take some extra care.