# y axis mark disconnected from axis after shifting upwards

as you can see I have shifted up the second axis. However I would like to fix the zero as it has been disconnected from the y axis.

\begin{tikzpicture}[scale=1.5]

\begin{axis}[
date coordinates in=x,
width=12cm,height=5.5cm, scale only axis,
xticklabel style={align=center, rotate=90, anchor=near xticklabel},
major x tick style = transparent,
ymin=0,
ymax=6,
ytick={0,1,2,3,4,5}
]
\end{axis}

\begin{axis}[
yshift=7cm,
anchor=north west,
width=12cm,height=1.5cm, scale only axis,major x tick style = transparent,
minor x tick num = 0,
xticklabels={,,}]

\end{axis}
\end{tikzpicture}

-

## 1 Answer

I suspect that you need to fix at least the lower y limit of the second axis, i.e. to add ymin=0 to your axis.

If your axes are both empty, you may see a warning claiming that

! Package pgfplots Warning: You have an axis with empty range. Replacing it with a default range and clearing all plots.

in this case, you have to provide all limits of the affected axis manually.

-