Sign inSign up

andreasjansson/asciiplot

By andreasjansson

Updated about 9 years ago

asciiplot.com

Image
0

227

andreasjansson/asciiplot repository overview

asciiplot

Web service that renders line plots as plain ASCII, using gnuplot. Deployed to asciiplot.com.

API examples

Pipe CSV to asciiplot
$ printf "1,2\n2,4\n4,8" | curl -X POST --data-binary @- asciiplot.com


  8 +-----------------+-----------------+-----------------+---------------###
    |                                                                 ####  |
  7 +                                                             ####      +
    |                                                         ####          |
  6 +                                                     ####              +
    |                                                 ####                  |
  5 +                                             ####                      +
    |                                         ####                          |
    |                                     ####                              |
  4 +                               ######                              *****
    |                      #########                           *********    |
  3 +             #########                           *********             +
    |    #########                           *********                      |
  2 #####                      **************                               +
    |        ******************                                             |
  1 *********---------+-----------------+-----------------+-----------------+
    0                0.5                1                1.5                2

Note: CSV must be numeric only, no headers.

Pass single column of comma-separated values
curl asciiplot.com?values=0.5,2,1.3


    2 +-----------------+---------------*********----------+----------------+
      |                               **         *****                      |
  1.8 +                            ***                *****                 +
      |                          **                        *****            |
  1.6 +                       ***                               *****       +
      |                     **                                       *****  |
  1.4 +                  ***                                              **+
  1.2 +                **                                                   *
      |             ***                                                     |
    1 +           **                                                        +
      |        ***                                                          |
  0.8 +      **                                                             +
      |   ***                                                               |
  0.6 + **                                                                  +
      **                                                                    |
  0.4 +-----------------+----------------+-----------------+----------------+
      0                0.5               1                1.5               2

Pass multiple columns as URL-encoded CSV
curl asciiplot.com?csv=10,1%0A20,2%0A30,3


  30 +-----------------+-----------------+----------------+--------------****
     |                                                            *******   |
  25 +                                                     *******          +
     |                                              *******                 |
     |                                       *******                        |
  20 +                                *******                               +
     |                         *******                                      |
  15 +                 ********                                             +
     |          *******                                                     |
     |   *******                                                            |
  10 ****                                                                   +
     |                                                                      |
   5 +                                                                      +
     |                                                     ##################
     ######################################################                 |
   0 +-----------------+-----------------+----------------+-----------------+
     0                0.5                1               1.5                2

Change width and height
curl "asciiplot.com?values=0.5,2,1.3&width=30&height=10"


    2 +----+---*********--+
  1.6 +      **         **+
  1.2 +    **             *
    1 +  **               +
  0.6 +**                 +
  0.4 *----+----+----+----+
      0   0.5   1   1.5   2

Moving average
curl "asciiplot.com?values=?values=6,5,1,2,3,5,6,5,1&avg=3"


  5.5 +-----------+----------+-----------+-----------+----------+-----------+
      |                                                        *****        |
    5 +                                                    ****     **      +
      |                                                ****           ***   |
  4.5 +                                             ***                  ** +
      |                                           **                       *|
    4 ***                                      ***                          *
      |  **                                  **                             |
      |    **                              **                               |
  3.5 +      **                         ***                                 +
      |        **                     **                                    |
    3 +          *                  **                                      +
      |           ******          **                                        |
  2.5 +                 ****    **                                          +
      |                     * **                                            |
    2 +-----------+----------*-----------+-----------+----------+-----------+
      0           1          2           3           4          5           6

Tag summary

Content type

Image

Digest

Size

300 MB

Last updated

about 9 years ago

docker pull andreasjansson/asciiplot