
Como puede ver, he subido el segundo eje. Sin embargo, me gustaría arreglar el cero ya que se ha desconectado del eje y.
\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}
Respuesta1
Sospecho que necesitas arreglar al menos el límite y inferior del segundo eje, es decir, agregarlo ymin=0
a tu eje.
Si ambos ejes están vacíos, es posible que vea una advertencia que indique que
! Package pgfplots Warning: You have an axis with empty range. Replacing it with a default range and clearing all plots.
en este caso, deberá proporcionar todos los límites del eje afectado manualmente.