Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

enter image description here

\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}
share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.