I like the idea of defining a bunch of coordinates and then creating the desired diagram from them, but now I have the following problem. The MWE below demonstrates it: the arrows connecting the two nodes are partially hidden by the contents of the nodes. I want to only reveal the diagram in stages (via \onslide
) which is why I havn't defined the node directly with the coordinate.
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}{MWE}
\begin{tikzpicture}
\foreach \y in {0,1,...,9}
{
\coordinate (A\y) at (0,{-1*\y});
\coordinate (B\y) at (7,{-1*\y});
}
\onslide<+->{\draw (A0) node{aaaa};}
\onslide<+->{\draw (A1) node{bbbb};}
\onslide<+->{\draw (A2) node{cccc};}
\onslide<+->{\draw[->] (A2)--(B2) node{dddd};}
\end{tikzpicture}
\end{frame}
\end{document}
shorten
, as in\onslide<+->{\draw[->,shorten >=20pt,shorten <=20pt] (A2)--(B2) node{dddd};}
– Gonzalo Medina May 4 '13 at 13:34[anchor=east]
for nodesA0
,A1
andA2
and[anchor=west]
for nodeB2
. – jub0bs May 4 '13 at 13:38