Skip to main content

create execution graph in GIF/PDF with LaTex

Project description

Graphanime - create execution graph in GIF/PDF

Ce module a pour but de générer des GIF, pdf type standalone ou Beamer ou APNG a partir d'un graph écrit en LaTeX. Et montrant l'execution d'un algorithme

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

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

graphanime-0.0.5.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graphanime-0.0.5-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file graphanime-0.0.5.tar.gz.

File metadata

  • Download URL: graphanime-0.0.5.tar.gz
  • Upload date:
  • Size: 9.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

Hashes for graphanime-0.0.5.tar.gz
Algorithm Hash digest
SHA256 4134307cc1235c1f8120a3817a41e4f00245ee9ef25526a0c05bc368f6511c1d
MD5 2babb9b99c93fa4c3b278cec7809ea92
BLAKE2b-256 d92778f84665a39056027f59c7a9899254fc63ec3d0877b1d398fcf4e5346795

See more details on using hashes here.

File details

Details for the file graphanime-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: graphanime-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.3 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

Hashes for graphanime-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 341cfa649856a76529c5f51d8b6e43e5df6cb2a893c41a330f82918aa727aca7
MD5 2f6a127705f45ca3be4f202802c846ed
BLAKE2b-256 e65e90e2a9de54d26f7b06cbb6222e1925af040147dc670cc7aa17257602f620

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page