Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/etano/graphscii
Print ASCII graphs in the terminal.
https://github.com/etano/graphscii
Last synced: about 2 months ago
JSON representation
Print ASCII graphs in the terminal.
- Host: GitHub
- URL: https://github.com/etano/graphscii
- Owner: etano
- License: mit
- Created: 2017-09-21T08:54:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-06-13T11:45:40.000Z (over 1 year ago)
- Last Synced: 2024-11-07T20:22:50.450Z (2 months ago)
- Language: Python
- Homepage: https://pypi.python.org/pypi/graphscii
- Size: 677 KB
- Stars: 84
- Watchers: 4
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
- starred-awesome - graphscii - Print ASCII graphs in the terminal. (Python)
README
graphscii
=========Print ASCII graphs in the terminal.
.. image:: https://github.com/etano/graphscii/blob/master/examples/risk.png
:alt: Risk graph
:width: 100%
:align: centerInstallation
------------The easiest way to install is with pip::
sudo pip install graphscii
To manually install, use::
sudo python ./setup.py install
Usage
-----To draw a graph, create a Graph object, add nodes and edges, and invoke the `draw()` method::
from graphscii import Graph
g = Graph()
g.add_node('n0', pos=[0.1, 0.1])
g.add_node('n1', pos=[0.9, 0.1])
g.add_node('n2', pos=[0.5, 0.9])
g.add_edge('n0', 'n1', label='e0')
g.add_edge('n1', 'n2', label='e1')
g.add_edge('n2', 'n0', label='e2')
g.draw().. image:: https://github.com/etano/graphscii/blob/master/examples/simple.png
:alt: Simple triangle graph
:width: 50%
:align: centerFor more examples, see the `examples` directory.