[Matplotlib-users] Efficiency in connecting two subplot.

Christophe Bal projetmbc at gmail.com
Tue Feb 20 15:03:42 EST 2018


Thanks

Christophe BAL
Enseignant Agrégé de Mathématiques
Programmeur Python Amateur

Le 20 févr. 2018 20:02, "Éric Depagne" <eric at depagne.org> a écrit :

> Hi Christophe,
>
> I am not sure it's what Ben had in mind (if not, I'm happy to know  how it
> should have been done), but here is the way I did it.
>
> (my _on_move() method is a member of a class)
> I added this to the __init__() :
> self.counter = 0
>
> Then I added the following lines to _on_move():
> self.counter += 1
> if self.counter %2 :
>         return
> [snip all the details of the update of the plots)
> self.counter = 0
>
> And it updates the plot every other move.
>
> Éric.
>
> --
> Un clavier azerty en vaut deux
> ----------------------------------------------------------
> Éric Depagne
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20180220/aadc3afd/attachment.html>


More information about the Matplotlib-users mailing list