Tutorial by Examples

Package TikZ lends itself very well to drawing graphs. This is a small example (requires TikZ 3.0+): \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{positioning,arrows.meta} \begin{document} \begin{tikzpicture}[auto,vertex/.style={draw,circle}] \node[vertex] (a) {A}; ...
TikZ provides syntax similar to DOT which you can use to tighten up your graph drawing code considerably. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{graphs,quotes,arrows.meta} \begin{document} \begin{tikzpicture} \graph[nodes={draw,circle},edges={-{Stealth[]}}] { ...
TikZ implements several algorithms for automatic graph layouts (requires LuaLaTeX). \documentclass{article} \usepackage{tikz} \usetikzlibrary{graphs,graphdrawing,quotes} \usegdlibrary{force} \begin{document} \begin{tikzpicture} \graph[spring layout] { A -> ["1"...
Suppose the following matrix is the transition probability matrix associated with a Markov chain. 0.5 0.2 0.3 P= 0.0 0.1 0.9 0.0 0.0 1.0 In order to study the nature of the states of a Markov chain, a state transition diagram of the Markov chain is drawn. \documentclass[12pt...

Page 1 of 1