views:

647

answers:

5

My question is very similar in spirit to this question: What is the best plotting library for Python?

What is my best bet for plotting data in C? Am I better off forgoing a library and just generating data that I can feed directly into gnuplot?

My impetus for this question is being able to visualize DSP transformations while studying the excellent resources found in an earlier question of mine. So the focus is really just 2D plots, histograms, etc.; 3D isn't as important right now.

+4  A: 

I think you are on the right track with gnuplot. For what you want, it's very powerful and flexible.

However, you may want to consider writing to gnuplot directly from your application instead of creating data and feeding it. There is an ANSI C API to gnuplot available.

Reed Copsey
I've developed gnupplus, a c++ variant of the library you linked. You can find a link for it on the same webpage you posted.
Dacav
+1  A: 

On Mac OS X you may also feed your data directly into Plot which features Perl based scripting and a commandline interface for none interactive data processing:

http://plot.micw.eu

In terms of a Mac OS X C-ish plotting framework see: core-plot

A: 

have you looked at AntiGrain? it's multiplatform

A: 

libgd. But if you don't have a lot of data to plot, gnuplot is a good way to go, as others suggested.

xcramps
A: 

I've found PLplot which seems to be interesting. I'm trying it right now and I'll publish here a quick review about it as I'll know something more on it.

Update: As first blush it seems to be badly design, since adds interactivity to the application (IMHO a library should never directly interface with the user unless this is the library's purpose).

Dacav