How do I place the first node at a specific position in beamer?
I have the following code:
\documentclass[xcolor=dvipsnames]{beamer}
\usepackage{times, pgf,verbatim} % pgf added for the umbc4 sty
\usepackage{tikz}
\usetikzlibrary{positioning,shapes.multipart,calc,arrows.meta}
\tikzset{
basic/.style={draw, text centered},
circ/.style={basic, circle, minimum size=2em, inner sep=1.5pt},
rect/.style={basic, text width=1.5em, text height=1em, text depth=.5em},
1 up 1 down/.style={basic, text width=1.5em, rectangle split, rectangle split horizontal=false, rectangle split parts=2},
}
\newcommand{\frt}[1]{\frametitle{#1}}
\title[]{Example}
\begin{document}
\titlepage
\begin{frame}
\frt{tikzpicture example}
\begin{tikzpicture}
\node [rect] (base) {$Y_1$} (0,2.75);
\node [rect, below=of base] (Y2) {$Y_2$};
\node [circ, above left=of base] (I) {$X_1$};
\node [circ, below left=of base] (T) {$X_5$};
\foreach \i [count=\ino] in {X_2,X_3,X_4,X_5,X_6,X_7,X_8} \node [circ] at ($(I)!\ino/4!(T)$) (\i) {$\i$};
\draw [->,>=Stealth] (X_3) -- (base);
\coordinate (arr) at (base.west);
\foreach \i/\j in {X_2/arr,X_4/arr,X_6/arr,X_7/arr,X_8/arr,I/arr,T/arr} \draw [->,>=Stealth] (\i) -- (\j);
\draw [->,>=Stealth] (T) -- (Y2);
\coordinate (arr) at (Y2.west);
\foreach \i/\j in {X_2/arr,X_3/arr,X_4/arr,X_6/arr,X_7/arr,X_8/arr,I/arr} \draw [->,>=Stealth] (\i) -- (\j);
\end{tikzpicture}
\end{frame}
\end{document}
I get:
as the second slide. I want to move the Y1 to be further to the right. However, no matter what I do to the (0,2.75) in the first line, it seems to make no difference.
How do I move the Y1 (and Y2, which is decided on by Y1) further to the right? I do not want to move the entire figure, but place the first node further to the right.


\node [rect] (base) at (foo,bar) {$Y_1$}instead of\node [rect] (base) {$Y_1$} (0,2.75);? – SebGlav Apr 28 '21 at 14:46\only<2>{\tikzset{node distance=1cm and 4cm}}right after\node [rect, below=of base] (Y2) {$Y_2$};– Torbjørn T. Apr 28 '21 at 15:00Xnodes were defined depending onY1. Hence the very good answer below, thanks to Ignasi. – SebGlav Apr 28 '21 at 16:50