GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fixing flag for demo · NamiStudio/bashplotlib@7db3ff4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • README.rst
  • bashplotlib
    • histogram.py
  • bin
    • texas
  • setup.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README.rst‎

Copy file name to clipboard
+91Lines changed: 91 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
bashplotlib
2+
===========
3+
4+
*plotting in the terminal*
5+
6+
what is it?
7+
-----------
8+
9+
bashplotlib is a python package and command line tool for making basic
10+
plots in the terminal. It's a quick way to visualize data when you don't
11+
have a GUI. It's written in pure python and can quickly be installed
12+
anywhere using pip.
13+
14+
installation
15+
------------
16+
17+
install with pip
18+
~~~~~~~~~~~~~~~~
19+
20+
::
21+
22+
$ pip install bashplotlib
23+
24+
install from source
25+
~~~~~~~~~~~~~~~~~~~
26+
27+
::
28+
29+
$ git clone [email protected]:glamp/bashplotlib.git
30+
$ cd bashplotlib
31+
$ python setup.py install
32+
33+
Either method will install the bashplotlib python package and will also
34+
add hist and scatter to your python scripts folder. This folder should
35+
be on your path (add it if it's not).
36+
37+
features
38+
--------
39+
40+
- quick plotting from the command line
41+
- customize the color, size, title, and shape of plots
42+
- pipe data into plots with stdin
43+
44+
usage
45+
-----
46+
47+
command line
48+
~~~~~~~~~~~~
49+
50+
hist takes input from either stdin or specified using the -f parameter.
51+
Input should be a single column of numbers. scatter takes x and y
52+
coordinates as input form either a comma delimited file using -f or from
53+
2 different files using -x and -y.
54+
55+
in python
56+
~~~~~~~~~
57+
58+
If you want to use bashplotlib from python, just import histogram and
59+
scatterplot.
60+
61+
::
62+
63+
from bashplotlib.scatterplot import plot_scatter
64+
65+
::
66+
67+
from bashplotlib.histogram import plot_hist
68+
69+
examples
70+
--------
71+
72+
::
73+
74+
$ scatter --file data/texas.txt --pch .
75+
76+
::
77+
78+
$ hist --file data/exp.txt
79+
80+
::
81+
82+
$ scatter -x data/x_test.txt -y data/y_test.txt
83+
84+
todo
85+
----
86+
87+
- sideways numbers for x-axis of histograms
88+
- colors for individual points
89+
- line charts
90+
- trendlines
91+
Collapse file

‎bashplotlib/histogram.py‎

Copy file name to clipboardExpand all lines: bashplotlib/histogram.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def main():
222222
if opts.f is None:
223223
if len(args) > 0:
224224
opts.f = args[0]
225-
elif opts.demo is False:
225+
elif opts.demo is None or opts.demo is False:
226226
opts.f = sys.stdin.readlines()
227227

228228
if opts.demo:
Collapse file

‎bin/texas‎

Copy file name to clipboard
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env python
2+
import os
3+
4+
_ROOT = os.path.abspath(os.path.dirname(__file__))
5+
6+
texas = os.path.join(_ROOT, "../bashplotlib", "data", "texas.txt")
7+
print open(texas).read().strip()
Collapse file

‎setup.py‎

Copy file name to clipboardExpand all lines: setup.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setup(
66
name="bashplotlib",
7-
version="0.5.1",
7+
version="0.5.3",
88
author="Greg Lamp",
99
author_email="[email protected]",
1010
url="https://github.com/glamp/bashplotlib",

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.