I recently made an entry at the matplotlib cookbook wiki:
I find it often quite useful to be able to identify points within a
plot simply by clicking. This recipe provides a fairly simple functor
that can be connected to any plot. I've used it with both scatter and
I thought I'd post a note here soliciting for comments and suggestions
on how I might do this better and faster. Specifically when the
number of points grows to tens of thousands things begin to crawl. I
was wondering how I can refresh only the text markers rather than the
whole plot? Also, is there a better way to identify the point closet
to where a user clicked? axis.pick doesn't quite do the right thing
because it returns whole collections - right?
I would like to create an animation that shows the path of a vehicle moving
along a trajectory. The vehicle could be represented by a small circle with and arrow
pointing along the vehicle's current heading. It would be nice to leave a bread crumb trail
of the vehicles path as a line.
I found documentation on making animations and movies but plotting a sequence of plots.
But I am not sure how I create or plot the circle plus arrow and then move it for the next plot.
(unless I just replot the whole plot everyframe) The Animation cookbook apparently provides
some hints but I am a little lost as to where to begin.
Do I need to create an artist? or a cursor?
I am using WxAgg on Mac Os X 10.4.4 although I could use another OS X supported backend if
it would be easier than WXAgg.
Any hints or a get started example