I'm drawing some path diagrams using TikZ. I'd like to draw an interaction in some of the diagrams. Trouble is, I can't quite see how to do it.
Below is some simple code that illustrates what I'm trying to do.
Code: Select all
\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{calc,shapes,shapes.geometric}
\tikzstyle{rect}=[rectangle,draw=black,font=\small\sffamily\bfseries,inner sep=9pt]
\tikzstyle{arr}=[-latex,black,line width=0.5pt]
\begin{document}
\begin{tikzpicture}[auto]
\node[rect] (X1) at (12, 0) {$X_1$};
\node[rect] (X2) at (18, 5) {$X_2$};
\node[rect] (Y) at (24, 0) {$Y$};
\draw[arr] (X1) to node[pos=.33,font=\scriptsize] {$\beta_1$} (Y);
\end{tikzpicture}
\end{document}
Thanks,
Paul