Hi all,

I want to use matplotlib to plot in realtime the position of a
microscope stage, read out over a serial connection. Essentially I
reached my goal, starting from the example

Now I have two questions

  1. I would like to stay independent of the backend, therefore I would prefer a approach like in idle_and_timeout

However, with my default backend WXAgg I do not continuously idle
events, but only once e.g. after each mouse movement. Can someone give
me more information about the intended behaviour, current status and
support of idle events?

  1. I want to limit the lifetime of my connection object, that takes
    care of the communication with the microscope stage, so that the
    connection is closed if I close the matplotlib figure. I could not find
    a ‘close_event’. To achieve this I could embed a matplotlib figure
    into a wx frame, but this is somewhat tediuos. For the wxagg backend,
    does somebody know a more simple solution? Do others also feel the need
    to add a close_event? In case, I could try to take care of the wx