그룹 도표에서 축 설명을 한 번만 인쇄하려면 어떻게 해야 합니까? (배경: 기호 x 좌표가 "xlabels at=하단 가장자리" 옵션을 중단함)

그룹 도표에서 축 설명을 한 번만 인쇄하려면 어떻게 해야 합니까? (배경: 기호 x 좌표가 "xlabels at=하단 가장자리" 옵션을 중단함)

그룹 플롯에서 기호 x 좌표를 사용하고 있습니다. . xmajorgrid​이에 대한 적절한 옵션을 찾을 수 없는 것 같습니다.

마지막 행의 플롯을 제외한 모든 플롯의 눈금 레이블만 비활성화하려면 어떻게 해야 합니까? (이 경우 하나의 플롯/하나의 열만)

pgfplots-tag를 따르는 사람을 위한 작은 메모: 너무 많은 질문을 올려 죄송합니다. 이 점에서 나는 엄청나게 저주받은 것 같습니다. 즉, 많은 작은 일이 제대로 작동하지 않고 문제를 생각할 수 없다는 것을 알게 된 것 같습니다.

그림

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

MWE

\documentclass[
a4paper
]{scrartcl}

\usepackage{
amsmath,
tikz,
pgfplots,
}

\usepgfplotslibrary{
groupplots,
}

\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}


\begin{document}
\begin{center}
\begin{tikzpicture}[font=\small]
\begin{groupplot}[
group style={
group size=1 by 3, %Spalte(n) by Zeile(n)
horizontal sep=0cm,
vertical sep=0.2cm,
xlabels at=edge bottom,
yticklabels at=edge bottom,
ylabels at=edge left,
yticklabels at=edge left,
},
%
ymin=0, ymax=30,
%
xlabel={Bla},
ylabel={Process},
%
xmajorgrids=true,
%
scale ticks above exponent={3},
]
\nextgroupplot[
xmin=10, xmax=20,
]
\addplot coordinates{(11,12) (13,15)};
\nextgroupplot[
symbolic x coords={11,13},
xtick=\empty,
]
\addplot[red, dashed] coordinates{(11,8) (13,25)};
\nextgroupplot[
xmin=10, xmax=20,
]
\addplot[orange, thick] coordinates{(11,8) (13,25)};
\end{groupplot}
\end{tikzpicture}
\end{center}
\end{document}

답변1

해결 방법

지금까지 내가 찾은 최고의 치료법은 x tick label style={color=white},. xticklabels의 위치 에 따라 꽤 잘 작동합니다 .

훨씬 덜 만족스러운 해결 방법은 선을 따라 무언가를 사용하여 \draw[thin, gray] (rel axis cs:0.33,0) -- (rel axis cs:0.33,1);그리드를 그리고 해당 명령을 사용하여 눈금을 그리는 것입니다. 여기에는 많은 T&E 실행이 포함될 수 있습니다.

\documentclass[
a4paper
]{scrartcl}

\usepackage{
amsmath,
tikz,
pgfplots,
}

\usepgfplotslibrary{
groupplots,
}

\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}


\begin{document}
\begin{center}
\begin{tikzpicture}[font=\small]
\begin{groupplot}[
group style={
group size=1 by 3, %col(s) by row(s)
horizontal sep=0cm,
vertical sep=0.2cm,
xlabels at=edge bottom,
yticklabels at=edge bottom,
ylabels at=edge left,
yticklabels at=edge left,
},
%
ymin=0, ymax=30,
%
xlabel={Bla},
ylabel={Process},
%
xmajorgrids=true,
%
scale ticks above exponent={3},
]
\nextgroupplot[
xmin=10, xmax=20,
]
\addplot coordinates{(11,12) (13,15)};
\nextgroupplot[
symbolic x coords={11,13},
%xtick=\empty,
x tick label style={color=white}, %<-------------- WORKAROUND HERE
]
\addplot[red, dashed] coordinates{(11,8) (13,25)};
\nextgroupplot[
xmin=10, xmax=20,
]
\addplot[orange, thick] coordinates{(11,8) (13,25)};
\end{groupplot}
\end{tikzpicture}
\end{center}
\end{document}

관련 정보