1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
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.6587850003804734
then 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 10
Likewise, 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.7
then 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