Skip to content

[Doc]: Blitting minimal example missing draw_event callback #29928

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

Open
the-yrr opened this issue Apr 16, 2025 · 0 comments
Open

[Doc]: Blitting minimal example missing draw_event callback #29928

the-yrr opened this issue Apr 16, 2025 · 0 comments

Comments

@the-yrr
Copy link

the-yrr commented Apr 16, 2025

Documentation Link

https://matplotlib.org/stable/users/explain/animations/blitting.html

Problem

the blitting minimal example with pause does not work (tested on Windows and Linux), the line (ln)/ ax.plot is shown for only one frame each animation step. calss based example or minimal without pasue works fine

Suggested improvement

Add the draw_event callback from the extended example, like this:

def on_draw(event):
        """Callback to register with 'draw_event'."""
        fig.canvas.figure.draw_artist(ln)

fig.canvas.mpl_connect("draw_event", on_draw)

also add the necessity of this callback to the strategy part of the documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants