|
From: Jianbao T. <jia...@gm...> - 2012-10-03 18:10:58
|
Dear Anthony, Thank you so much for your advice. I embedded my response below. Jianbao On Wed, Oct 3, 2012 at 10:49 AM, Anthony Floyd <ant...@gm...>wrote: > Hi Jianbao, > > First some context: at the company I work for, we've been using > matplotlib to do much of what you want to do for the past 4 years. We > have created our own application for plotting, interrogating, and > manipulating time-series data coming from both simulations and > measurements, although from a completely different domain (in our case > it's virtual manufacturing of composite materials). In the past two > years, we've also been using matplotlib to plot in more-or-less > realtime data from a cloud industrial sensors (temperature, pressure, > etc). > Do you have any references, such as screen shots, gallery, examples, or whatever? I am very curious to see what people can do with matplotlib. > > After reading the matplotlib documents and trying out several little > > examples for a few days, I now have a feeling that matplotlib at least > has > > most of the infrastructure ready for my purposes. One thing that bothers > me > > a little bit is that the plotting speed seems to be a little slow. But > IDL > > had the same problem in the first place too. As computers became faster > and > > faster, that problem just became less and less important. I expect the > same > > thing will happen to matplotlib too. > > This is true, matplotlib can be slow, particularly for large data sets > and many data sets. The trick is to downsample (and use tiling if > you're going to be panning around a lot) what you're actually plotting > before handing it off to the plot. I think more recent versions of > matplotlib handle some of this for you, but we've found that it's > faster to do the downsampling ourselves. > As a matter of fact, I considered writing intermediate routines to handle downsampling before feeding data in matplotlib. However, you will have to do anti-alias filtering for that. So, I wasn't sure downsampling would boost the speed anyway. But based on your experience, this is probably a good idea. :-) > > > Now let me turn to technical stuff. What I want is a time-series plotting > [...] > > sufficient. Third, the system should have minimal dependencies for the > sake > > of portability and installation easiness. As for now, I don't want any > > dependencies beyond numpy, scipy, and matplotlib. Ipython would be a > highly > > recommended tool, but the system should be just fine without it. > > You're going to need more than that. At the very least you're going to > need a widget framework like wxPython, pyQT, pyGTK, or some such. > These will provide you with all the window management, widget > controls, and so on. Our preference is wxPython but YMMV. > One of my concerns about third-party widget framework is that sometimes it is difficult to install them. In fact, I tried to install wxPython on my Mac (10.8 OS X) last night, but didn't succeed. Another concern of mine is that I don't know how efficient or how easy to interact with a thrid-party widget framework from a python interpreter. However, again, based on your reply, it doesn't seem to be a big issue after all. > > > After weighing all the options, I sense that I will probably be better > off > > to use the matplotlib library directly, rather than the convenient > utilities > > provided by pyplot. However, I am having a hard time to find good > > instructions for using the matplotlib infrastructure. So, I would like to > > hear some references on that. I also would like to hear general advice > about > > how to construct such a system so that its structure is consistent with > > matplotlib conventions. Other comments and advice are warmly welcome too. > > Absolutely, you'll want to use the API rather than the utility > functions. The best reference for that is the online documentation at > matplotlib.org. In the past we've found the source code documentation > (or, say, that generated by doxygen) more helpful than the Sphinx > documentation, but frankly our matplotlib bits are pretty stable now > and we haven't had to use the documentation for a while (perhaps it's > better now). > > Good luck! We've been very happy with our design choices, and get > nothing but positive feedback on how our plots look and feel. > matplotlib and the amazing active community around it have everything > to do with that. > I am very glad to hear that. :-) > > Anthony. > |