RE: [PHP-DB] WAS: Use php to plot graph. NOW: ASCII GRAPH CONTEST

From: Date: Tue, 04 Dec 2001 09:10:30 +0000
Subject: RE: [PHP-DB] WAS: Use php to plot graph. NOW: ASCII GRAPH CONTEST
Groups: php.db 
Request: Send a blank email to php-db+get-14802@lists.php.net to get a copy of this message
we could even give an "i love linux" t-shirt to the winner of the contest! -----Original Message----- From: Daniel Barton [mailto:dbarton@prbo.org] Sent: 03 December 2001 17:00 To: bas@startpunt.cc; php-db@lists.php.net Subject: Re: [PHP-DB] WAS: Use php to plot graph. NOW: ASCII GRAPH CONTEST 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: > Hi, > > > 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? > > Tnx, > > Bas > > -- ---------- Dan Barton Terrestrial Program Biologist Asst. Data Manager Point Reyes Bird Observatory http://www.prbo.org dbarton@prbo.org dbarton@grayflycatcher.org -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.303 / Virus Database: 164 - Release Date: 24/11/01 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.303 / Virus Database: 164 - Release Date: 24/11/01

« previous php.db (#14802) next »