tags:

views:

18

answers:

1

I am programming system in C and I would like to draw rectangles into 2D plain with axis X and Y to represent generated data (scheduling problems).It should LOOK LIKE gant chart. Information are supplied in text file. I don't need anything fancy yet. Just something like "draw box in color Red starting at X=5, Y=3, ending at X=7,Y=5". It should support axis scaling and I would like it to generate any size of image.

Do any of you have good experience with such a tool that can be used to generate this kind of images from command-line (from some file perhaps that have each line in Color XY XY format)?

So far I see gnuplot as only feasible solution.

A: 

Hi

Check out GraphViz, in particular dot. dot really wants to do the graph layout itself, but if memory serves me well you can force it to place boxes in fixed positions. You can use dot from the command line or plug into its API.

Or, you might consider writing SVG directly, it's only text -- but whether this works for you depends in part on what final form you want the graphic in. Most browsers now make a fair stab at rendering SVG.

Beyond that, you might look at ImageMagick, Dislin, Cairo or any one of a multitude of other graphics libraries.

So, GNUPlot is not the only feasible solution by a long way.

Regards

Mark

High Performance Mark