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 (name node) at(x,y) [options split by comma] {display} ;
\node () at(,) [] {} ;
\node () at(,) [] {} ;
%(name node): characters prohibited: ) [ ; \node
%at(x,y): optional : x and y must to do a well coordonate : numbers
%[options split by comma]: option of node. Few details:
%fill=color
%label=text of label ou label={text of label} ou label={:text of label}
%label={position of label:text of label}
%label={[color du label]:text of label}
%label={[color du label]position of label:text of label}
%text of label : characters prohibited: ; { } ,
%draw ou draw=
%draw=color
{Affichage}: charactères interdits: { ] ;
%\path (name node A) edge[options split by comma] (name node B);
\path
() edge[] ()
() edge[] ()
;
%name node: to reference to name of node set upper
%[options split by comma]: options for edge/arc. Few details:
%-> or <-or -: way of edge
%"edge_label": indication on edge, for Dijkstra it's weight, for Dijkstra obligatory option
% edge_label : characters prohibited: ; , " \node
%color=color: la color of edge
\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.1.1
- add Bellman-Ford algorithm
- update list of frobidden characters
- fix problem with Ford-Fulkerson
0.1.0
- fix parser (now it's take - )
- change template FR to EN
- add option color for all algotithm
- add documentation for Kruskal, Floyd-Warshall and Ford-Fulkerson
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.1.1.tar.gz.
File metadata
- Download URL: graphanime-0.1.1.tar.gz
- Upload date:
- Size: 15.4 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 |
2e1ea87648c2d8a160779abd2d6ad405ac64c43d0e8748afcb417ceb197f22f7
|
|
| MD5 |
0f251eee0ae4865cf130cff42335b14d
|
|
| BLAKE2b-256 |
b199d5f4b983410c64991fb98277e6808e35d5e49a2afe39a072d0aeccc97c2f
|
File details
Details for the file graphanime-0.1.1-py3-none-any.whl.
File metadata
- Download URL: graphanime-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.5 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 |
acee7526c78d4170feb0eadf269687e1a1531d5154875765121916bbb6c2661b
|
|
| MD5 |
6a0dea1fd0f4db9e3862b401f6773a4f
|
|
| BLAKE2b-256 |
0d95a5652d92d2bba4134a1eef1e508bb5b456988b6b02712bee80ffb6cf2f17
|