Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/milliams/plot
Command-line plotting tool written in Rust
https://github.com/milliams/plot
command-line histogram plot rust
Last synced: 18 days ago
JSON representation
Command-line plotting tool written in Rust
- Host: GitHub
- URL: https://github.com/milliams/plot
- Owner: milliams
- Created: 2017-02-17T22:06:16.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-09T20:37:32.000Z (over 7 years ago)
- Last Synced: 2024-10-11T01:25:56.124Z (about 1 month ago)
- Topics: command-line, histogram, plot, rust
- Language: Rust
- Size: 71.3 KB
- Stars: 25
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
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:
.. code-block:: bash
$ head -n4 data.txt
11.01821751894866
-3.862915996857989
4.293330805873133
2.6587850003804734then you can plot a histogram of that with
.. code-block:: bash
$ cat data.txt | plot hist
which will output something like::
12-| ----
| | |
| ------- | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | ---| |---
| | | | | | | |
| | | | | | | |
8-| | | | | | | |---
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| ---| | | | | | | |---
| | | | | | | | | | |
| ---| | | |--| | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
4-| | | | | | | | | | | | ----
| | | | | | | | | | | | | |
| | | | | | | | | | | |------ | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
|--- ---- | | | | | | | | | | | | |--| |
| | | | | | | | | | | | | | | | | | |
| | ---- | |--| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | |
0+------------------------------------------------------------
| | | | |
-10 -5 0 5 10Likewise, if you have a data file (or any pipeable stream) which has a two-column format like:
.. code-block:: bash
$ 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.7then you can draw a scatter plot of data using
.. code-block:: bash
$ cat data2.txt | plot scatter
which outputs::
| o
|
|
4-| o
| o
|
|
|
| o
2-|
|
|
| o
|
0-|
|
|
|
| o
+------------------------------------------------------------
| | |
0 4 8