|
1 | | -#bashplotlib |
| 1 | +# bashplotlib |
2 | 2 | *plotting in the terminal* |
3 | | -<br><br> |
| 3 | + |
4 | 4 | <img src="examples/img/basichist.png"> |
5 | 5 |
|
6 | | -##what is it? |
7 | | -<p>bashplotlib is a python package and command line tool for making basic plots in the terminal. It's a quick way to visualize data when you don't have a GUI. It's written in pure python and can quickly be installed anywhere using pip.</p> |
8 | | - |
9 | | -##installation |
10 | | -<h5>install with pip</h5> |
11 | | -<pre> |
12 | | - $ pip install bashplotlib |
13 | | -</pre> |
14 | | -<h5>install from source</h5> |
15 | | -<pre> |
16 | | - $ git clone [email protected]:glamp/bashplotlib.git |
17 | | - $ cd bashplotlib |
18 | | - $ python setup.py install |
19 | | -</pre> |
20 | | - |
21 | | -<p>Either method will install the bashplotlib python package and will also add <code>hist</code> and <code>scatter</code> |
22 | | -to your python scripts folder. This folder should be on your path (add it if it's not).</p> |
23 | | - |
24 | | -##features |
25 | | -<ul> |
26 | | - <li>quick plotting from the command line</li> |
27 | | - <li>customize the color, size, title, and shape of plots</li> |
28 | | - <li>pipe data into plots with stdin</li> |
29 | | -</ul> |
30 | | - |
31 | | -##usage |
32 | | -<h5>command line</h5> |
33 | | -<p><code>hist</code> takes input from either stdin or specified using the -f parameter. Input should be a single column of numbers.</p> |
| 6 | +## what is it? |
| 7 | +bashplotlib is a python package and command line tool for making basic plots in the terminal. It's a quick way to visualize data when you don't have a GUI. It's written in pure python and can quickly be installed anywhere using pip. |
| 8 | + |
| 9 | +## installation |
| 10 | +### install with pip |
| 11 | +``` |
| 12 | +$ pip install bashplotlib |
| 13 | +``` |
| 14 | +### install from source |
| 15 | +``` |
| 16 | +$ git clone [email protected]:glamp/bashplotlib.git |
| 17 | +$ cd bashplotlib |
| 18 | +$ python setup.py install |
| 19 | +``` |
| 20 | + |
| 21 | +Either method will install the bashplotlib python package and will also add <code>hist</code> and <code>scatter</code> |
| 22 | +to your python scripts folder. This folder should be on your path (add it if it's not). |
| 23 | + |
| 24 | +## features |
| 25 | + |
| 26 | +- quick plotting from the command line |
| 27 | +- customize the color, size, title, and shape of plots |
| 28 | +- pipe data into plots with stdin |
| 29 | + |
| 30 | + |
| 31 | +## usage |
| 32 | +### command line |
| 33 | +<code>hist</code> takes input from either stdin or specified using the -f parameter. Input should be a single column of numbers. |
34 | 34 | <img src="examples/img/histhelp.png"> |
35 | | -<p><code>scatter</code> takes x and y coordinates as input form either a comma delimited file using -f or from 2 different files using -x and -y.</p> |
| 35 | +<code>scatter</code> takes x and y coordinates as input form either a comma delimited file using -f or from 2 different files using -x and -y. |
36 | 36 | <img src="examples/img/scatterhelp.png"> |
37 | 37 |
|
38 | | -<h5>in python</h5> |
39 | | -<p>If you want to use bashplotlib from python, just import histogram and scatterplot.</p> |
40 | | -<pre>from bashplotlib.scatterplot import plot_scatter</pre> |
| 38 | +### in python |
| 39 | +If you want to use bashplotlib from python, just import histogram and scatterplot. |
| 40 | +`from bashplotlib.scatterplot import plot_scatter` |
41 | 41 | <img src="examples/img/scatterplothelp.png"> |
42 | | -<pre>from bashplotlib.histogram import plot_hist</pre> |
| 42 | +`from bashplotlib.histogram import plot_hist` |
43 | 43 | <img src="examples/img/histogramhelp.png"> |
44 | 44 |
|
45 | 45 | ##examples |
46 | | -<pre>$ scatter --file data/texas.txt --pch .</pre> |
| 46 | +`$ scatter --file data/texas.txt --pch .` |
47 | 47 | <img src="examples/img/texas.png"> |
48 | 48 |
|
49 | | -<pre>$ hist --file data/exp.txt</pre> |
| 49 | +`$ hist --file data/exp.txt` |
50 | 50 | <img src="examples/img/histogram.png"> |
51 | 51 |
|
52 | | -<pre>$ scatter -x data/x_test.txt -y data/y_test.txt</pre> |
| 52 | +`$ scatter -x data/x_test.txt -y data/y_test.txt` |
53 | 53 | <img src="examples/img/scatter.png"> |
54 | 54 |
|
55 | 55 | ##todo |
56 | | -<ul> |
57 | | - <li>sideways numbers for x-axis of histograms</li> |
58 | | - <li>colors for individual points</li> |
59 | | - <li>line charts</li> |
60 | | - <li>trendlines</li> |
61 | | -</ul> |
| 56 | + |
| 57 | +- sideways numbers for x-axis of histograms |
| 58 | +- colors for individual points |
| 59 | +- line charts |
| 60 | +- trendlines |
| 61 | + |
62 | 62 |
|
0 commit comments