Print ASCII graphs in the terminal
Project description
Print ASCII graphs in the terminal.
Installation
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()
For more examples, see the examples directory.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
graphscii-1.0.4.tar.gz
(4.4 kB
view details)
File details
Details for the file graphscii-1.0.4.tar.gz
.
File metadata
- Download URL: graphscii-1.0.4.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f0fb5cb540cffc3517d6addce8fc6926e9b8d06714d2f32a82f990895afdeb4 |
|
MD5 | 52cffbd7ca49c64ee93e9095b98ff6cf |
|
BLAKE2b-256 | 1e2f98a61d7e003ca0c31b54084e915c77c19c920749249750f9c58e9aa6f423 |