ASCII Plotter

Allows you to plot simple graphs in ASCII. I use it when I want to visualize data real quick,
(for example, the numerical contents of a list).

Example usage:

In [15]: import aplotter
In [16]: aplotter.plot([1.0/(x+1) for x in range(29)])
   |
   |
   +1
   |
   |
   ||
   ||
   ||
   | |
   | |
   |  \
   |  \
   |   \
   |    \
   |     \\-
   |        --
   |          --------
   |                  ---------------------
---+0.034----------------------------------================================+----
   +0                                                                   +28

Among the features:

  • Plot x,y charts
  • Plot with or without (simple) interpolation
  • Plot with or without ascii-slopes (seen in the example)

The source in Python

6 Responses to ASCII Plotter

  1. Kurt Neufeld says:

    Can you provide an example program that uses this?

    Thanks,
    Kurt

  2. lorg says:

    Actually, not right now… At first ASCII plotter was used in PyTuner, but then I decided it wasn’t really helping, so I removed it. I still use it from time to time when I want a quick estimate of numerical data during interactive work, and working with pylab/matplotlib is more of a hassle than I would care to undergo. I’ll add some example use-cases soon.

  3. Pingback: Tweets that mention ASCII Plotter | Algorithms Blog -- Topsy.com

  4. yuwash says:

    I wrote a simple example and published it to https://gist.github.com/yuwash/6134540
    Thanks Imri for the handy script!

  5. Pingback: Python:Python ASCII Graph Drawing – IT Sprite

  6. Andy Caird says:

    Is this on github (or similar?) I’d like to add some things to it, but I don’t want to just steal your code and make it available.

    Also, this makes me so happy – thank you!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.