Beamer で tikzpicture を使用して有向アクリル グラフを作成する

Beamer で tikzpicture を使用して有向アクリル グラフを作成する

私はビーマープレゼンテーションに有向アクリルグラフを追加しようとしています。このコード(以下に再現) スライドを作成しましたが、生成された画像では、すべてのノードと矢印がほぼ重なり合っています。ノードの位置をいろいろ試してみましたが、どの位置を入力しても、画像内で重なり合っているように見えます。beamer でこれを正しく表示するには (サイトの下の画像のように) どうすればよいですか?

IVのDAG

\begin{frame}
\begin{tikzpicture}
% nodes %
\node[text centered] (z) {$Z$};
\node[right = 1.5 of z, text centered] (t) {$T$};
\node[right=1.5 of t, text centered] (y) {$Y$};
\node[draw, rectangle, dashed, above = 1 of t, text centered] (u) {$U$};

% edges %
\draw[->, line width= 1] (z) --  (t);
\draw [->, line width= 1] (t) -- (y);
\draw[->,red, line width= 1,dashed] (u) --node {X} (z);
\draw[->,line width= 1] (u) --(t);
\draw[->,line width= 1] (u) -- (y);
\draw[->, red, line width=1,dashed] (z) to  [out=270,in=270, looseness=0.5] node{X} (y);
\end{tikzpicture}

\end{frame}

関連情報