[Tex/LaTex] Tikz: adjusting length of arrow

tikz-pgf

So I'm trying to make this path diagram

enter image description here

So far I have the following

\documentclass[12pt,a4paper]{article}
\usepackage{tkz-graph}
\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},
}

\begin{document}

\begin{center}
\begin{tikzpicture}
  \node [rect] (base) {$Y$};
  \node [rect, right=of base] (I) {$I$};
  \node [rect, right=of I] (r) {$r$};
  \node [circ, left=of base] (L) {$L$};
  \node [circ, above=0.4em of L] (K) {$K$};
  \node [circ, above=1em of I] (G) {$G$};
        \draw [->] (K) -- (base);
        \draw [->] (L) -- (base);
        \draw[->] (base) -- (I);
        \draw [->] (I) -- (r);
        \draw [->] (G) -- (I);
\node [rect, above right= 0.1em of base] (C) {$C$};
        \draw [->] (base) -- (C) -- (I);
\node [circ, above left=1em of C] (T) {$T$};];
        \draw [->] (T) -- (C);
\end{tikzpicture} 
\end{center}

\end{document}

which gives me this

enter image description here

My question is, how can I make the length of the arrow between the base, Y, and I bigger so C can fit in?

Best Answer

You can do it like this:

\documentclass[12pt,a4paper]{article}
\usepackage{tkz-graph}
\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},
}

\begin{document}

\begin{center}
\begin{tikzpicture}[>=latex]
  \node [rect] (base) {$Y$};
  \node [rect, above right=.2em and 3em of base] (C) {$C$};
  \node [rect, below right=.2em and 3em of C] (I) {$I$};
  \node [rect, right=of I] (r) {$r$};
  \node [circ, left=of base] (L) {$L$};
  \node [circ, above=0.4em of L] (K) {$K$};
  \node [circ, above=1em of I] (G) {$G$};
        \draw [->] (K) -- (base);
        \draw [->] (L) -- (base);
        \draw [->] (base) -- (I);
        \draw [->] (I) -- (r);
        \draw [->] (G) -- (I);
        \draw [->] (base) -- (C);
        \draw [->] (C) -- (I);
\node [circ, above left=.2em and 2em of C] (T) {$T$};
        \draw [->] (T) -- (C);
\end{tikzpicture} 
\end{center}

\end{document}

enter image description here

To have this symmetry between Y, C, and I, you can put them like this:

  \node [rect] (base) {$Y$};
  \node [rect, above right=.2em and 3em of base] (C) {$C$};
  \node [rect, below right=.2em and 3em of C] (I) {$I$};

so that C can be at a middle position between Y and I.

Also, for positioning T, you can write

\node [circ, above left=.2em and 2em of C] (T) {$T$};

to control how high and how far it is to the left of C.