wxmpl, PlotPanel and connecting mpl events...

Hi,
sorry if I haven't been alive for a while but...

Always happy to help save a life! :wink:

...yes, it seems it's working, and my life is (temporarily) safe! :smiley:

Thanks a lot for your help. The mix of learning wx, threading and matplotlib (plus a bunch of other things, like XML libs) all at once (and all almost in my spare time) was driving me mad... that's the life of grad students.

Just a question: Why is the replot hack needed? It works, but I tried without, and it seems that mpl is not able to redraw itself correctly with a draw() call. Is it a known mpl bug/issue/"feature"?

Also, it would be nice to add something about the issue of clicking data in the wxmpl docs, just for the relief of dumb newbies like me. I can sketch it for you if you like.

If there are other wxmpl-related issues, I'll take the liberty to let you know!

m.

路路路

--
Massimo Sandal
University of Bologna
Department of Biochemistry "G.Moruzzi"

snail mail:
Via Irnerio 48, 40126 Bologna, Italy

email:
massimo.sandal@...898...

tel: +39-051-2094388
fax: +39-051-2094387

Just a question: Why is the replot hack needed? It works, but I tried without, and it seems that mpl is not able to redraw itself correctly with a draw() call. Is it a known mpl bug/issue/"feature"?

It's more of a WxMpl problem. Matplotlib's Axes class has no concept of "zoom" history. WxMpl keeps track of the zoom history (e.g. axes view limits) separately, but doesn't make any attempt to integrate that into PlotPanel.draw().

I've only come to realize this was a problem recently, as I've begun to use WxMpl in increasingly interactive situations. I've been planning to take care of saving and restoring the view limits automatically in PlotPanel.draw() so library users won't have think about it. Perhaps the right thing to do is put a matplotlib patch together to add zoom(xlim, ylim) and unzoom() methods to Axes.

Also, it would be nice to add something about the issue of clicking data in the wxmpl docs, just for the relief of dumb newbies like me. I can sketch it for you if you like.

Don't worry about it, it sounds like you have enough on your plate. I'll add something to the tutorial before the next release.

If there are other wxmpl-related issues, I'll take the liberty to let you know!

Please do, and don't hesitate to let me know if there are features that you think would be valuable.

As an aside, you should take a look at the current development version [1]. I think I've finally managed to remove any traces of crosshair junk due to repaints, window focus changes, etc. The hope is that this will make for a more polished user experience.

Ken

[1] http://svn.csrri.iit.edu/mr-software/wxmpl/trunk

路路路

On Apr 18, 2006, at 4:15 AM, massimo sandal wrote: