Re: Different graphing options




On May 5, 2005, at 2:13 AM, ofey aikon wrote:

I want to do some pretty graphs in Gtk2 using my dataset. I guess my
options are the following.

Narrow the scope a bit; what's more important?

 - showing plots (only have to exist in the gui)
 - saving plots (want to save them, but preview in a gui)
 - interactive plots (user can mouse-over and/or edit data)
 - high-quality plots (speed is not a concern)
 - quick plots (e.g., a fast-updating gui)
 - type of plots (3D surface plots, pie charts, or just lines on axes)
- ease of creation (full-featured, singing and dancing grapher or drawing stuff on a canvas for yourself)

There are lots of charting and plotting options on CPAN, each with its own strengths and weaknesses.


1. Wrap gnuplot.
 - Rich in functionality. May be too heavy to wrap. Don't know how
well it works on win32.

Chart::Graph::Gnuplot (part of Chart::Graph)
http://search.cpan.org/~caidaperl/Chart-Graph-2.0/Graph/Gnuplot.pm

Term::Gnuplot
http://search.cpan.org/~ilyaz/Term-Gnuplot/Gnuplot.pm

Geo::GNUPlot
http://search.cpan.org/~carpenter/Geo-GNUPlot_0.01/lib/Geo/GNUPlot.pm


2. Use gtkplot in the gtkextra+ project.
 - No perl bindings AFAIK.

used that in the 1.x series once upon a time with an in-house library. it turned out to be very over-engineered for what we wanted. GtkPlot allows the user to edit and interact with the data, which, while cool, is often unnecessary. i have not tried GtkPlot since then. that was about four years ago; we abandoned GtkPlot and used Chart::Graph::Gnuplot, and eventually dropped even that because we decided that charting was beyond the scope of our library. (no we use jpgraph on the other end of the data pipeline. ;-)

i'm also not sure if it's possible to use GtkPlot to generate plot images without having a window or X connection around. dunno if that's important to you, but it may be worth looking into.

it looks like the gtkextra-2.0 API is a little more binding-friendly, but i'm a little unnerved that they don't appear to have released out of cvs.

if there's a good demand for bindings for gtkextra-2.0, then please make noise, and we'll arrange something. (sorry, i'm not in a position to whip them out of thin air at the moment.)


3. Stream an image using GD::Graph.
 - Works on win32 too.

GD is pretty widely used, and working with images is fairly easy from Gtk2.


There's also Ploticus, which has a funky input syntax but generates nice-looking output.

http://ploticus.sourceforge.net/


--
I don't have a drinking problem,
'cept when i can't get drink.
  -- Tom Waits




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]