From: massimo s. <mas...@un...> - 2005-11-30 18:30:08
|
Chris, >> but (1)I have read that it requires to rewrite some basic pylab >> facilities > > As any of us write them, we need to contribute them back to MPL, so that > one day, everything will be in the OO interface. there will always be a > couple extra things, like managing where to put your MPL window, but > you'd want to control that anyway in an embedded app. I'd surely love to contribute to free software. I'll probably hack something to cover my needs, but I think contributing back would need to have things polished and coherent. I don't know if I will manage to do it... Anyway I'll release all my software publicly under a free license (GPL probably), and if I put up something of interest for MPL, I will be happy to discuss it on the MPL-devel mailing list. About the OO MPL interface, it seems to be a bit lacking in documentation. Is there some hint you can give me? What important goodies pylab has that the OO interface has not? I'm expecially concerned about the rectangular zoom and mapping the mouse position on the plot, I have quite a need for them. >> It seems messy to me to learn WxPython and to embed matplotlib in it >> at the same time > > > You are right that that is a bit of a project. Well, I had a look to the wxpython tutorial in the meantime and happily it looks easier than I thought before. I have already played with Tkinter in the past and the underlying logic seems similar. So perhaps it's not so bad, I'll play a bit with wxpython at home to see how comfortable I am. >> So, there are two solutions that I'm considering: >> - Using WxMpl or MPlot. > > I would say to use one of these for sure. > >> What are pros and cons of both wrappers? > > I'd love to see this too. It would be great if we could standardize on > one, full featured, wxMPL solution. Hope someone will give us suggestions about these libraries. I'm not that happy to add another dependency to my project, but reading below it seems the only way to go. >> - Creating a small, pure WxPython application that calls pylab to >> manage graph operations. > The issue is that pylab expects to manage it's own Frame. You can't have > two wxPython applications in one process, so they will collide, unless > you are talking about running a pylab instance in a separate process. > That would require some kind of inter-process communication, which would > be more work than figuring out how to embed MPL in wx. Ok. This is a bit bad, because it seemed the simplest solution. I thought that the pylab frame and the wxapp frame could be kept distinct but interacting in the same app, just being two separate objects. Thank you a lot, you saved me a lot of time! Massimo -- Massimo Sandal University of Bologna Department of Biochemistry "G.Moruzzi" snail mail: Via Irnerio 48, 40126 Bologna, Italy email: mas...@un... tel: +39-051-2094388 fax: +39-051-2094387 |