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
and run with:
graph2img graph.txt
This will return a file graph.png
:
Installation from source
Draw graphs according to edges input.
You need to install xelatex before use.
To use it:
git clone https://github.com/ForwardStar/graph_drawer.git
cd graph_drawer
touch graph.txt
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:
python -u main.py graph.txt
This will return a file graph.png
:
10/02/2022 Update:
Now you can use the program 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:
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.0.0.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for graph2img-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b07a69a0fdad452c085175af6e68b65f23413d790e77f1190c8adc8b65da8093 |
|
MD5 | 00fbef2769752bc2d4aa7c04c85a0ae8 |
|
BLAKE2b-256 | 7bde9de1d4c40a64a255c4499268d5e78c7a059f9515c5f69af701ed73944684 |