create execution graph in GIF/PDF with LaTex
Project description
Graphanime - create execution graph in GIF/PDF
This module aim to create GIF, APNG, pdf type standalone or Beamer from a graph written in LaTex. And showing an excution of one algorithm (for exemple Dijkstra)
Install module:
pip install graphanime
Commande
load(file.tex)
return an object Graph which represented graph write in LaTeX
Dijkstra(graph,source,sink):
excute dijkstra algorithm on graph and return list of graph
gen_beamer(anim,file)
it's Back-end for slide Beamer with a source is list of graph (anim)
gen_pdf(anim,file)
it's Back-end for natural pdf with a source is list of graph (anim)
gen_gif(anim,file)
it's Back-end for GIF with a source is list of graph (anim)
gen_apng(anim,file)
it's Back-end for APNG with a source is list of graph (anim) WARNING: it's not support everywhere
Template
\documentclass[tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{quotes}
%\usepackage{}
%\use...library{}
%\tikzset{every figure} = []
\begin{document}
\begin{tikzpicture}
%\node (nom node) at(x,y) [options separées par virgules] {affichage} ;
\node () at(,) [] {} ;
\node () at(,) [] {} ;
%(nom node): charactères interdits: ) [ ;
%at(x,y): optionel : x et y doivent être des coordonnées viables: des nombres
%[options séparées par virgules]: les options du nœud. En détail certain:
%fill=couleur
%label=texte du label ou label={texte du label} ou label={:texte du label}
%label={position du label:texte du label}
%label={[couleur du label]:texte du label}
%label={[couleur du label]position du label:texte du label}
%texte du label : charactères interdits: ; { } ,
%draw ou draw=
%draw=couleur
{Affichage}: charactères interdits: { ] ;
%\path (nom node A) edge[options separées par virgules] (nom node B);
\path
() edge[] ()
() edge[] ()
;
%nom node: fait reference à un nom de nœud défini plus haut
%[options séparées par virgules]: les options de l’arrête/arc. En détail certain:
%-> ou <-ou -: le sens de l’arrête
%"edge_label": indication sur l’arrête, pour Dijkstra indique le poids, pour Dijkstra option obligatoire
% edge_label : charactères interdits: ; , "
%color=couleur: la couleur de l’arrete.
\end{tikzpicture}
\end{document}
exemple
x = load('Exemples/exemple_dijkstra_wiki.tex')
A = Dijkstra(x, "node 1", "node 5")
gen_gif(A, "versusWiki",700)
And for more exemple go to github
Change Log
0.0.9
- add Kruskal algorithm
- add Floyd-Warshall algorithm
- add Ford-Fulkerson algorithm
- fix bug: the parser in funct load() take well the other_option of edge
- update template
0.0.8
- change name github project
0.0.7
- change documentation FR to EN
0.0.5
- first realese that works well
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file graphanime-0.0.9.tar.gz.
File metadata
- Download URL: graphanime-0.0.9.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51c42ec2e7879f9fc8cf83579a4141debb22a5d7c38948c49d5bc625f22e8fac
|
|
| MD5 |
f1459a6a1606082502142018b5cb7167
|
|
| BLAKE2b-256 |
704c5cf2d35ff0f7098d6bc98b0b238aa6e8b97c9319dbd6df60634a5ae9035e
|
File details
Details for the file graphanime-0.0.9-py3-none-any.whl.
File metadata
- Download URL: graphanime-0.0.9-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea5a0614a1f9a755c12e93771a66374755936dda157ca7ca5101390922b4aa94
|
|
| MD5 |
dab12edb5ea36b5853efe6f442bf3599
|
|
| BLAKE2b-256 |
ced3e0c6840f70e23416fb809e899b19018408cee2e42f028d258bdb423dd5e2
|