X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f996b,8ae611e029f9880b X-Google-Attributes: gidf996b,public X-Google-ArrivalTime: 2002-11-14 03:21:08 PST Newsgroups: alt.ascii-art From: Harry Mason Subject: Re: ASCII-Art function plotting, advice needed... References: Message-ID: User-Agent: slrn/0.9.7.4 (Linux) NNTP-Posting-Host: orbital.ecs.soton.ac.uk Date: 14 Nov 2002 11:15:50 GMT X-Trace: 14 Nov 2002 11:15:50 GMT, orbital.ecs.soton.ac.uk Lines: 42 Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.gamma.ru!Gamma.RU!peer.news.eu-x.com!server2.netnews.ja.net!news-spool.soton.ac.uk!news.ecs.soton.ac.uk!orbital.ecs.soton.ac.uk Xref: archiver1.google.com alt.ascii-art:20658 Josef 'Jupp' Schugt wrote: [ascii function plotter] > The idea of achieving a good vertical resolution is mapping > > [0.000, 0.025) to '_', [0.025, 0.075) to '-', [0.075, 0.100) to '"'. > > Anybody has a better mapping? Forget about '^' or similar characters > that look very different in different fonts - I can't control the > font that is used. The ideal mapping would take into account not only > the value at a given point but also the left and right neighbor > (which is an approximation for the slope). The problem I see with this is large gradients. For sin(x) it is quite possible to create a smooth curve in ascii, but if you were drawing a few more periods it would soon stop looking like sin(x) at all. If your gradients aren't too large you could try this mapping. Rows are the value at the left hand edge of the character cell; columns are the value at the right hand edge. <0 0.00 0.25 0.50 0.75 >1 <<0, >>1 0.00 _ _ , , / / _ 0.25 . _ . - = / . 0.50 . . - - " ' - 0.75 \ \ = ` " ' " > You wonder what this plotter is good for? The idea is to make a > server output status diagrams even if there is no 'real' graphics > available. Things like uptime, load, active connections? You might be better off with a histogram; it's much easier to represent in ascii. You might want to talk to Markus Gebhard; he wrote a function plotter for JavE (http://www.jave.de/). The code isn't available, but you could ask his advice. -- Harry Mason ("hjm200.ecs@soton@ac@uk" =~ tr/@./.@/)