The method I used for ascii graphs was based on some C program I wrote that
created an array, which was, in essence, the graph. Each array element was two
characters wide (we''l see why..) The first column of the array is all |, to make
a Y axis, and the last row if the array is all _, to make an X axis. Then there
were two other arrays, for labels, that were stuck along side or below the axes
(dynamic). The first array is modified based on the data, using O, -, |, \ and /
in goofy combinations to draw lines. Then I characterized characters (heehee) as
either wide, or narrow, to avoid width problems, and when it's a "narrow"
character you insert a space to avoid problems with lines not lining up. Then,
spit the array out to the display. Whheeeee fun.
We should have an "ASCII/PHP/Database Graphing Contest." I'll host it if there
are interested contestants. Suggested design: HTML form for data input, passes to
PHP script for immediate (and STYLIN') ascii output. Any takers?
Will post the code/output example when I have a free moment...
Bas Jobsen wrote:
> > 4) Program some really slick ascii graphs. No joke, I did this a while ago.
> > Nice output. Really fast. You can do line graphs, too.
> Intressting. Do you have an example?
Terrestrial Program Biologist
Asst. Data Manager
Point Reyes Bird Observatory
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]