위쪽으로 이동한 후 y축 표시가 축에서 끊어졌습니다.

위쪽으로 이동한 후 y축 표시가 축에서 끊어졌습니다.

보시다시피 두 번째 축을 위로 이동했습니다. 그러나 y축에서 연결이 끊어졌으므로 0을 수정하고 싶습니다.

여기에 이미지 설명을 입력하세요

\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

나는 적어도 두 번째 축의 하한 y 제한을 수정해야 한다고 생각합니다. 즉, ymin=0축에 추가해야 합니다.

축이 모두 비어 있으면 다음과 같은 경고가 표시될 수 있습니다.

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

이 경우 영향을 받는 축의 모든 제한을 수동으로 제공해야 합니다.

관련 정보