I have drawn three axes, or segments of axes, that I want to be aligned at the node (0,0). The first one is drawn, then the second underneath, then the third under that. Two have text above the axes where the text should begin at the node (0,0) but above it.
How can I get them aligned?
When I add the text the axes below shift to the right. How to prevent this so the axes don't move relative to the length or existence of the text?
I am not sure how to plot them all in one tikzpicture, so I have made three to be graphed sequentially.
\begin{tikzpicture}
\draw (0,0) -- (10,0) ; % axis
\foreach \x in {0,2,4,6, 8, 10} % vertical lines
\draw[shift={(\x,0)},color=black] (0pt,3pt) -- (0pt,-3pt);
\node at (0,0) [below=3] {0};
\node at (2,0) [below=3] {1};
\node at (4,0) [below=3] {2};
\node at (6,0) [below=3] {3};
\node at (8,0) [below=3] {4};
\node at (10,0) [below=3] {5};
\end{tikzpicture}
\begin{tikzpicture}
\draw (0,0) -- (8,0) ; % axis
\foreach \x in {0,2,4,6, 8} % vertical lines
\draw[shift={(\x,0)},color=black] (0pt,3pt) -- (0pt,-3pt);
\node at (0,0) [below=3] {0};
\node at (2,0) [below=3] {1};
\node at (4,0) [below=3] {2};
\node at (6,0) [below=3] {3};
\node at (8,0) [below=3] {4};
\node at (0,0) [above=3] {This is the first statement.};
\end{tikzpicture}
\begin{tikzpicture}
\draw (0,0) -- (2,0) ; % axis
\foreach \x in {0,2} % vertical lines
\draw[shift={(\x,0)},color=black] (0pt,3pt) -- (0pt,-3pt);
\node at (0,0) [below=3] {0};
\node at (2,0) [below=3] {1};
\node at (0,0) [above=3] {This is the second statement of a different length.};
\end{tikzpicture}