My preamble is this:
\usepackage{graphicx,tikz}
\usetikzlibrary{matrix,arrows,positioning}
\setcounter{MaxMatrixCols}{20}
Currently I am using this:
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.5cm,
thick,main node/.style={square,fill=blue!20,draw,font=\sffamily\Large\bfseries}]
\matrix (m) [matrix of math nodes,nodes={rectangle,draw}, row sep=0.5em,
minimum size=2em, column sep=0em, text height=1.5ex, text depth=0.25ex]
{ 80 & \cdots & 166 & \quad & 195 & \cdots & 230 \\ };
\path[->,font=\scriptsize]
(m-1-1) edge[bend right=80] node[auto] {} (m-1-5)
(m-1-1) edge[bend right=80] node[auto] {} (m-1-6)
(m-1-2) edge[bend right=80] node[auto] {} (m-1-5)
(m-1-2) edge[bend right=80] node[auto] {} (m-1-7)
(m-1-3) edge[bend right=80] node[auto] {} (m-1-7)
(m-1-3) edge[bend right=80] node[auto] {} (m-1-5);
\node[fill=white,minimum size=2.1em] at (-0.025,0) {};
\path[->,font=\scriptsize]
(m-1-5) edge[bend right=80] node[auto] {} (m-1-3)
(m-1-5) edge[bend right=80] node[auto] {} (m-1-2)
(m-1-6) edge[bend right=80] node[auto] {} (m-1-1)
(m-1-6) edge[bend right=80] node[auto] {} (m-1-2)
(m-1-7) edge[bend right=80] node[auto] {} (m-1-3)
(m-1-7) edge[bend right=80] node[auto] {} (m-1-2);
\end{tikzpicture}
To create:
First off, this is very tedious and I am wondering if there is a better way to create such an image in TeX. In particular, creating the gap in the rectangles required me to put a white square node overtop of an empty node by just guessing at the coordinates. I feel there must be a better way. Also, how would I make one of these nodes filled in yellow? They only way I could figure out how to do that is by overwriting the node with a yellow square node and again guessing at where the coordinates are until it seemed right. Please tell me there is a better way to do this.
Thank you.
{ 80 & \cdots & 166 & |[draw=none]| \quad & 195 & \cdots & 230 \\ }
? For the edges I’d use\path[bend right=80]
and then two foreach loops.|[fill=yellow]|
at the start of a cell? You can also do stuff likerow 1 column 5/.style={nodes={fill=yellow}}
or something like that.