Command-line plotting tool written in Rust
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Move render.rs to text_render.rs in plotlib Mar 9, 2017
.gitignore Add vscode files to gitignore Mar 9, 2017
.travis.yml Add travis support Feb 25, 2017
Cargo.lock Update version number Mar 9, 2017
Cargo.toml Update version number Mar 9, 2017
README.rst Update readme with latest visuals and scatter plot example Mar 8, 2017

README.rst

Plot

A command-line statistics and plotting tool.

plot works on input streams and so if you have a file called data.txt which looks like:

$ head -n4 data.txt
11.01821751894866
-3.862915996857989
4.293330805873133
2.6587850003804734

then you can plot a histogram of that with

$ cat data.txt | plot hist

which will output something like:

12-|                                   ----
   |                                   |  |
   |                       -------     |  |
   |                       |  |  |     |  |
   |                       |  |  |     |  |
   |                       |  |  |     |  |
   |                       |  |  |     |  |
   |                       |  |  |  ---|  |---
   |                       |  |  |  |  |  |  |
   |                       |  |  |  |  |  |  |
 8-|                       |  |  |  |  |  |  |---
   |                       |  |  |  |  |  |  |  |
   |                       |  |  |  |  |  |  |  |
   |                       |  |  |  |  |  |  |  |
   |                       |  |  |  |  |  |  |  |
   |                    ---|  |  |  |  |  |  |  |---
   |                    |  |  |  |  |  |  |  |  |  |
   |                 ---|  |  |  |--|  |  |  |  |  |
   |                 |  |  |  |  |  |  |  |  |  |  |
   |                 |  |  |  |  |  |  |  |  |  |  |
 4-|                 |  |  |  |  |  |  |  |  |  |  |        ----
   |                 |  |  |  |  |  |  |  |  |  |  |        |  |
   |                 |  |  |  |  |  |  |  |  |  |  |------  |  |
   |                 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
   |                 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
   |---        ----  |  |  |  |  |  |  |  |  |  |  |  |  |--|  |
   |  |        |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
   |  |  ----  |  |--|  |  |  |  |  |  |  |  |  |  |  |  |  |  |
   |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
   |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
  0+------------------------------------------------------------
       |           |           |          |           |
      -10         -5           0          5          10

Likewise, if you have a data file (or any pipeable stream) which has a two-column format like:

$ cat data2.txt
-3 2.3
-1.6 5.3
0.3 0.7
4.3 -1.4
6.4 4.3
8.5 3.7

then you can draw a scatter plot of data using

$ cat data2.txt | plot scatter

which outputs:

  |        o
  |
  |
4-|                                              o
  |                                                        o
  |
  |
  |
  |  o
2-|
  |
  |
  |                 o
  |
0-|
  |
  |
  |
  |                 o
  +------------------------------------------------------------
                   |                  |                  |
                   0                  4                  8