Gnome Data Mine: Bar Chart

Bar Chart

[original; chubb]

The original Bar Chart can be downloaded from here and a new improved version from Peter Chubb can be downloaded from here and saved into a file which should be made executable (chmod u+x barchart) and then run the script (./barchart --help).

Bar Chart is a shell script using gnuplot and transfig to generate a bar chart of supplied data. The output is PDF, EPS, FIG, or PNG graphics. FIG output means that xfig can be used to fine tune the chart or to add extra annotations and then exported from xfig to PDF or EPS or PNG.

Bar Charts from one or two data files are currently supported. Trend lines can be draw (--trend) and the y values can be printed (--values). A maximum value for the y axis can be set with --maxy. The graphics output format is chosen with --type. See the --help option for details.

Of course, gnumeric and other spreadsheets are pretty good at generating bar charts. The advantage of this Bar Chart is that it can be used programmatically to generate hundreds of bar charts automatically. Typically in exploring large numbers of trends we the place these images into pages of multiple images (e.g. 20 per page) to review. We also use the tool to generate PDF graphics for inclusion in LaTeX documents.

A sample input file might be:

      Example Bar Chart from Gnome Data Mine
Financial_Year Return_On_Investment
94/95 12250
95/96 52340
96/97 101136
97/98 120823
98/99 150345
99/00 195125
00/01 260456

Below is a seleciton of bar charts produced with the Gnome Data Mine Bar Chart. The two data files used are and The command used to produce the PNG file is given. Note that the output resolution is not as good as a vector graphic file (e.g., PDF, EPS, or FIG).

      $ barchart -T png > barchart1.png

Other example graphics appear below.

      $ barchart -T png -v -t > barchart1a.png
      $ barchart -T png > barchart2.png
      $ barchart -T png --log=y > barchart2l.png
      $ barchart -T png -v -t > barchart2a.png

Ads Follow - These are Not Endorsed by Togaware
Shop at Amazon