From: Ken M. <mc...@ii...> - 2005-12-01 23:47:56
|
On 12/01/05 04:43, massimo sandal wrote: > Ken: > >An embedding library will give you those features, plus ones which > >pylab does not (e.g. printing support, selecting points and regions). > > Ok. What I wanted to know is if in pylab there were hard-coded features > that the MPL OO interface has not, or if these features were already > present in MPL but simply had to be called and merged together by the > user (don't know if I'm being clear here - anyway you seem to point it's > the second, happier case). I think I understand the question now. I thought you were worried about interactive plotting features, but I now believe you're asking about plotting in general (please correct me if I'm wrong!). In terms of plotting, etc, I can't think of anything that pylab can do that you can't do using the OO API. You sometimes have to do a bit more work (because pylab manages a lot of details for you), but I haven't ran into any major problems. Of course, I'm using about one tenth of matplotlib's capabilities in my day-to-day work (plot(), imshow(), pcolor()), so you're milage may vary slightly. :-) > >On using matplotlib bindings and the Navigator toolbars, I'd guess you > >don't want to do this. The toolbars are ugly, take up screen real > >estate, do stuff you don't need and don't do stuff you do need. > > I agree toolbars are not essential, but they're nice IMHO. I don't > strictly need them, except for the panning and zooming tools. Hope > they're not hard to reproduce, should I have a look at the pylab code?). Here are the toolbar classes: WX backend -- matplotlib.backends.backend_wx.NavigationToolbar2Wx WXAgg backend -- matplotlib.backends.backend_wxagg.NavigationToolbar2WxAgg NavigationToolbar2WxAgg just overrides the "get_canvas(fig, frame)" method to return a FigureCanavsWXAgg, so you'll want to look at NavigationToolbar2Wx if you're interested in how it works. The following files in the "examples/" subdirectory of the source distribution make use of a WX toolbar. They should help you get started, if you choose to go that route. dynamic_demo_wx.py dynamic_image_wxagg2.py embedding_in_wx2.py embedding_in_wx4.py wxcursor_demo.py Ken |