<div dir="ltr">It looks like you are redrawing the _whole_ figure every time.<div><br></div><div>You can use blitting (see <a href="https://matplotlib.org/api/animation_api.html#funcanimation">https://matplotlib.org/api/animation_api.html#funcanimation</a> for details) to only re-draw the axes that is changing.</div><div><br></div><div>Tom</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Feb 20, 2018 at 3:28 PM Benjamin Root <<a href="mailto:ben.v.root@gmail.com">ben.v.root@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Yup, that's pretty much it. Since you have it all in a class, then doing `self.counter` makes a lot of sense. You can also tune it accordingly to do only every 3rd, 4th, 5th or what-have-you.<br><br></div>Cheers!<br></div>Ben Root<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 20, 2018 at 3:03 PM, Christophe Bal <span dir="ltr"><<a href="mailto:projetmbc@gmail.com" target="_blank">projetmbc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Thanks<span><br><br><div data-smartmail="gmail_signature">Christophe BAL<br>Enseignant Agrégé de Mathématiques<br>Programmeur Python Amateur</div></span></div><div class="m_1679269409317365885HOEnZb"><div class="m_1679269409317365885h5"><div class="gmail_extra"><br><div class="gmail_quote">Le 20 févr. 2018 20:02, "Éric Depagne" <<a href="mailto:eric@depagne.org" target="_blank">eric@depagne.org</a>> a écrit :<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Christophe,<br>
<br>
I am not sure it's what Ben had in mind (if not, I'm happy to know  how it<br>
should have been done), but here is the way I did it.<br>
<br>
(my _on_move() method is a member of a class)<br>
I added this to the __init__() :<br>
self.counter = 0<br>
<br>
Then I added the following lines to _on_move():<br>
self.counter += 1<br>
if self.counter %2 :<br>
        return<br>
[snip all the details of the update of the plots)<br>
self.counter = 0<br>
<br>
And it updates the plot every other move.<br>
<br>
Éric.<br>
<br>
--<br>
Un clavier azerty en vaut deux<br>
----------------------------------------------------------<br>
Éric Depagne<br>
<br>
<br>
</blockquote></div></div>
</div></div><br>_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org" target="_blank">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org" target="_blank">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
</blockquote></div>