graph2img: convert a graph to a png file.
Project description
Installation by pip
Install with pip:
pip install graph2img
Then write your edge information into graph.txt
. For example:
1 2 1
2 3 2
1 3 3
This will return a triangular graph.
Then run the program:
graph2img graph.txt
This will return a file graph.png
:
Or to draw a tree:
1 2 1
1 3 2
2 4 2
2 5 3
3 6 3
3 7 2
1 9 1
2 8 2
This will return a tree:
Options
Two options are provided:
--save-temp-files=true/false
--output-format=png/svg
If you want to save the temporary files (like tex codes), set --save-temp-files
as true
;
If you want to generate a svg format image, set -output-format
as svg
.
Installation from source
git clone https://github.com/ForwardStar/graph_drawer.git
cd graph_drawer
python setup.py install
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
graph2img-1.2.4.tar.gz
(6.7 kB
view hashes)
Built Distribution
Close
Hashes for graph2img-1.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 074b9035c2c1fa26726dc7da9c4c9e4eb55090842dd7740942d9d1fae2c7c03f |
|
MD5 | 7092242c555a5ff1ae03981f08cabe1b |
|
BLAKE2b-256 | 5b3795da4bd0933d6042d52631f55e147eb078c4877c184c2f7cf831eb9f48fb |