![Wie kann ich die Achsenbeschreibungen in einem Gruppendiagramm nur einmal ausdrucken? (Hintergrund: symbolische X-Koordinaten unterbrechen die Option „xlabels at=bottom edge“)](https://rvso.com/image/298796/Wie%20kann%20ich%20die%20Achsenbeschreibungen%20in%20einem%20Gruppendiagramm%20nur%20einmal%20ausdrucken%3F%20(Hintergrund%3A%20symbolische%20X-Koordinaten%20unterbrechen%20die%20Option%20%E2%80%9Exlabels%20at%3Dbottom%20edge%E2%80%9C).png)
Ich verwende symbolische X-Koordinaten in einem Gruppendiagramm. Dies erweist sich als problematisch, da ich die Markierungen und Markierungsbeschriftungen für die oberen Diagramme nicht deaktivieren kann, ohne sie zu verlieren xmajorgrid
. Ich kann anscheinend keine geeignete Option dafür finden.
Wie kann ich nur die Teilstrichbeschriftungen für alle Diagramme außer denen in der letzten Zeile deaktivieren? (in diesem Fall nur ein Diagramm/eine Spalte)
kleine Anmerkung am Rande für alle, die dem pgfplots-Tag folgen: entschuldigen Sie, dass ich so viele Fragen stelle, ich scheine in dieser Hinsicht außerordentlich verflucht zu sein, d.h. dass ich viele kleine Dinge finde, die nicht so gut funktionieren und nicht in der Lage bin, um die Probleme herumzudenken
Bild
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}
Antwort1
Problemumgehung
Das beste Mittel, das ich bisher gefunden habe, verwendet x tick label style={color=white},
. Es funktioniert ziemlich gut, abhängig von der xticklabel
Position des S.
Eine wesentlich weniger zufriedenstellende Problemumgehung besteht darin, etwas in der Art von \draw[thin, gray] (rel axis cs:0.33,0) -- (rel axis cs:0.33,1);
zum Zeichnen des Rasters und entsprechende Befehle zum Zeichnen der Markierungen zu verwenden. Dies kann viele T&E-Läufe erfordern.
\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}