API's for graphs, plots, time series

Started by
3 comments, last by sandy_bence 17 years, 9 months ago
Hi, I will be writing a program in either C, C++ or (maybe) Perl to generate time series data. e.g. time: 0,1,2,3,4,5, ... value: 23,16,22,19,24, ... For ease of use, I want to plot this as a time plot onto a graph within the program. (Instead of writing the data to a file, exiting my progam and running a plotting programming, such as Gnuplot, just to view it) I want to use a gui for the program, and am currently leaning towards using QT (http://doc.trolltech.com/). I understand QT has a canvas tool module which contains graphical elements such as circles, lines, etc. However, I think this may be cumbersome to program a plotting function using these basic elements. Scaling the graphs axis and changing resolution, etc, may be difficult, for example. Does anyone know of any API's which allow relatively easy plotting of data as graphs/time plots? Does anyone have a preference to which one they use? Something that can 'plug' into QT would be preferable but is not necessary. I have done some 'googling' but I'm interested in anyone's actual experiences with such tools. Thanks for any advice, Sandy.
Advertisement
Perhaps QWT?

http://qwt.sourceforge.net/plotscreenshots.html
If you decide to use Perl, GD (in particular GD::Graph) is pretty much the de facto graph and chart drawing library.

GD Docs

GD::Graph Docs

If you're using Linux, your distro probably ships with GD, so check out your distro's package repositories, otherwise you can get the library in the usual way using cpan on Unix/Linux and ppm on Windows.
- CheeseMonger
If you know python then scipy and matplotlib are excellent choices. You can choose to use the library with different toolkits--tinker/wxpython. Since the wxpython bindings are excellent you can make whole interface programs that also have plot widgets.

http://www.scipy.org/
http://matplotlib.sourceforge.net/
http://www.wxpython.org/
I did stumble on QWT and will probably use this. Thanks for the advice guys.

A colleague suggested PARI (http://pari.math.u-bordeaux.fr/), which I'm going to look into. Could be an overkill though. Has anyone used this before? Thoughts?

This topic is closed to new replies.

Advertisement