From: John H. <jd...@gm...> - 2008-05-26 15:08:33
|
On Mon, May 26, 2008 at 7:01 AM, New2Python <new...@li...> wrote: > I hope someone can give me a simple solution to my problem. I have a line > plotted and I need to be able to mark selected data points on the line. I am If you are frequently changing the zoom level, as it looks like you are, the copy background/restore region/blit idiom is probably not the right one for you, since the background is assumed fixed. You can simply force a draw at any time by doing fig.canvas.draw() w/o having to zoom out or resize to trigger a draw. So after doing the self.marker.set_data call, I would do fig.canvas.draw If you have a lot of data and only a little in the viewport and efficiency is a concern, you can use a "clipped line" class, as in the example http://matplotlib.sf.net/examples/clippedline.py Let me know if this helps, JDH |