Boost logo

Boost :

From: Kevin Lynch (krlynch_at_[hidden])
Date: 2007-01-08 13:53:04

Neal Becker wrote:
> Paul A Bristow wrote:
>> Do Boosters have any suggestions/experience on how to automate this
>> process, ideally so that a C++ program directly outputs a .png file.
> I suggest look at grace. It is a wonderful, free graphing app with high
> quality output. It can run from the command line, and has various
> interfaces, such as python interface.
> _______________________________________________
> Unsubscribe & other changes:

I would concur that grace is a good tool, although I haven't used it
enough to know it's quirks.

Here's a few of the tools I regularly use to do this sort of stuff:

You could look into gnuplot. It's output leaves something to be desired
for printed publications, but for online or documentation plots it's not
bad. You can still generate your csv files, and write yourself a
gnuplot script to automate the production of various file formats (gif,
png, jpg, eps, pdf, pnm, etc. etc. etc.) You may also be able to hook
into it directly from the c++ if you work hard enough to figure it out
... I've never tried that.

You might consider replacing the photoshop step with the ImageMagick
toolkit, which can do just about anything to image files that you can
think of. You can do your conversion, scaling, and antialiasing in a
little commandline script, or through the library. It won't help with
the plotting step, however.

If you aren't averse to installing a really big package, you could look
at the Root framework ( It isn't exactly the best example
of modern C++ best practices, but you can fill out a plot or histogram
directly from your C++ library. It's a bit of a steep learning curve,
but can make some really pretty plots programmatically. You could even
run all your code interactively (I'd compile your library to a so/dll,
generate the dictionary, and then load it into the interpreter).

I'm sure there are other tools like this that I've used, and if I think
of them, I'll let you know.

Kevin Lynch				voice:	(617) 353-6025
Physics Department			Fax: (617) 353-9393
Boston University			office:	 PRB-361
590 Commonwealth Ave.			e-mail:	 krlynch_at_[hidden]
Boston, MA 02215 USA

Boost list run by bdawes at, gregod at, cpdaniel at, john at