Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lucasgautheron/9513fc3b2b865b3eed6ae863c78102cf to your computer and use it in GitHub Desktop.
Save lucasgautheron/9513fc3b2b865b3eed6ae863c78102cf to your computer and use it in GitHub Desktop.
figures
\documentclass{standalone}% For the example only, any class will do
\usepackage{tikz}
\usetikzlibrary{positioning}% To get more advances positioning options
\usetikzlibrary{arrows}% To get more arrow heads
\begin{document}
\begin{tikzpicture}
\node (A) {$A(i,j)$};
\node (YI) [below of=A, left of=A]{$Y(i)$};
\node (YJ) [below of=A, right of=A]{$Y(j)$};
\node (XI) [above of=A, left of=A]{$X(i)$};
\node (XJ) [above of=A, right of=A]{$X(j)$};
\node (UI) [above of=XI, left of=XI]{$U_X(i)$};
\node (UJ) [above of=XJ, right of=XJ] {$U_X(j)$};
\draw[->] (UI) to node {} (XI);
\draw[->] (UJ) to node {} (XJ);
\draw[->] (XI) to node {} (A);
\draw[->] (XJ) to node {} (A);
\draw[->] (XI) to node {} (YI);
\draw[->] (XJ) to node {} (YJ);
\draw[->] (A) to node {} (YI);
\draw[->] (A) to node {} (YJ);
\draw[->, bend right] (UI) to node {} (YI);
\draw[->, bend left] (UJ) to node {} (YJ);
\end{tikzpicture}
\begin{tikzpicture}
\node (A) {$A(i,j)$};
\node (YI) [below of=A, left of=A]{$Y(i)$};
\node (YJ) [below of=A, right of=A]{$Y(j)$};
\node (XI) [above of=A, left of=A]{$X(i)$};
\node (XJ) [above of=A, right of=A]{$X(j)$};
\node (UI) [above of=XI, left of=XI]{$U_X(i)$};
\node (UJ) [above of=XJ, right of=XJ] {$U_X(j)$};
\draw[->] (UI) to node {} (XI);
\draw[->] (UJ) to node {} (XJ);
\draw[->] (XI) to node {} (A);
\draw[->] (XJ) to node {} (A);
\draw[->] (XI) to node {} (YI);
\draw[->] (XJ) to node {} (YJ);
\draw[->] (A) to node {} (YI);
\draw[->] (A) to node {} (YJ);
\draw[->, bend right] (UI) to node {} (YI);
\draw[->, bend left] (UJ) to node {} (YJ);
\draw[->, bend left, color=orange] (UI) to node {} (A);
\draw[->, bend right, color=orange] (UJ) to node {} (A);
\end{tikzpicture}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment