Skip to main content

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: ) [ ;
%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: ; , "
	%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.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

graphanime-0.1.0.tar.gz (14.5 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.1.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: graphanime-0.1.0.tar.gz
  • Upload date:
  • Size: 14.5 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.1.0.tar.gz
Algorithm Hash digest
SHA256 e76656940d5bd847751b2ad3c10511303100b3a0094de818e592b813208ada3e
MD5 b7102e57f048c00884b1bc7a6cc19c93
BLAKE2b-256 7ffba435f100f8e1c66335828f1bc51532189c05af6c4f0ae2886baa1862f236

See more details on using hashes here.

File details

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

File metadata

  • Download URL: graphanime-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 054f7b949943614ad6a29d5786ab2ca89d3cc2ec27abde9b610d1a024364bbf9
MD5 ed1bcdfb1fe066dc994a2245199dcdec
BLAKE2b-256 e2ad9ad23125bed00f4631ad79835404885daceb37b4cee06764e4ff3752e468

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