tags:

views:

240

answers:

2
+2  Q: 

GTK+-based graph?

I want to be able to make a line graph using GTK+ but I'm unsure how to approach this. Has anyone got any hints or tips?

A: 

Have a look at the gnuplot there are some C++ libraries that interface with gnuplot, which do what you are looking for and then some. It is very easy to use if you've ever used gnuplot.

hhafez
+2  A: 

I just want to add some more alternatives to this common request.

  1. libgoffice
    This is the library used by Gnumeric and AbiWord, so it is actively maintained and fairly stable: one of the sanest alternative currently available. Unfortunately, there is no official home page and it lacks beginners documentation.
  2. GtkDatabox
    It recently changed the maintainer, so there is some uncertainty in the future. It used to be a good solution for rendering a lot of data in line plots.
  3. GtkExtra2
    This was the old de-facto standard of plotting charts in GTK+. The jump to GTK+2 seems to have been fatal to this project.
  4. GTK+ instrumentation widgets and GLineGraph
    Somewhat spartans but good for simple stuff.

Other than that, a lot of projects implement internally some kind of GTK+ charting. Other than the yet cited Gnuplot, there is also Gwyddion and gretl. And I'm pretty sure I'm missing tons of others.

In conclusion, there is no general consensus nor a de-facto standard for charting in the GTK+ world...

ntd
Im currently having a look at how gnome-system-monitor draws its graphs, to me the way it implements it using cairo seems to be a good way to plot, plus im trying to plot in real time as well. Thanks for you info ntd, its all taken on board.
paultop6