von Darcy » Mi 12. Jul 2017, 20:58
Hallo zusammen,
ich möchte in meinem Diagramm gerne Datenpunkte mit gestrichelten Linien verbinden. Aber die Marker für die Punkte sollen nicht gestrichelt sein. Im Manual für pgfplots steht, dass \pgfplotsset{every mark/.append style={solid}} dieses Problem beheben würde. Das tut es nur leider nicht. Wo liegt der Fehler in meinem Beispiel?
Danke und Grüße
Darcy
\documentclass[a4paper,oneside,10pt,captions=nooneline]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{pgfplots}
\usetikzlibrary{matrix}
\pgfplotsset{compat=newest, every mark/.append style={solid}}
\begin{document}
\begin{figure}[htb]
\centering
\begin{tikzpicture}
\begin{axis}[
xlabel={Zeit\,/\,min},
ylabel={Spezifische Diluatleitf{\"a}higkeit},
enlarge x limits=0.01,
scale only axis,
xmax=330,
ymin=0.12,
ymax=0.18,
axis y line=left]
\addplot[gray, mark=triangle*, dotted] coordinates{
(0, 0.12)
(150, 0.15)
(330, 0.17)};
\addplot [black, mark=x, dotted] coordinates{
(0, 0.13)
(150, 0.14)
(330, 0.15)};
\end{axis}
\begin{axis}
[xlabel={{Zeit\,/\,min}},
ylabel={{Strom\,/\,A}},
enlarge x limits=0.01,
xmax=330,
ymin=0.15,ymax=0.55,
scale only axis,
axis y line=right,
axis x line=none]
\addplot [only marks, gray, mark=triangle*] coordinates{
(0, 0.15)
(150, 0.35)
(330, 0.54)};
\addplot [only marks, mark=x] coordinates{
(0, 0.17)
(150, 0.25)
(330, 0.35)};
\end{axis}
\end{tikzpicture}
\caption{Test dotted}
\end{figure}
\end{document}
Hallo zusammen,
ich möchte in meinem Diagramm gerne Datenpunkte mit gestrichelten Linien verbinden. Aber die Marker für die Punkte sollen nicht gestrichelt sein. Im Manual für pgfplots steht, dass \pgfplotsset{every mark/.append style={solid}} dieses Problem beheben würde. Das tut es nur leider nicht. Wo liegt der Fehler in meinem Beispiel?
Danke und Grüße
Darcy
[code]
\documentclass[a4paper,oneside,10pt,captions=nooneline]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{pgfplots}
\usetikzlibrary{matrix}
\pgfplotsset{compat=newest, every mark/.append style={solid}}
\begin{document}
\begin{figure}[htb]
\centering
\begin{tikzpicture}
\begin{axis}[
xlabel={Zeit\,/\,min},
ylabel={Spezifische Diluatleitf{\"a}higkeit},
enlarge x limits=0.01,
scale only axis,
xmax=330,
ymin=0.12,
ymax=0.18,
axis y line=left]
\addplot[gray, mark=triangle*, dotted] coordinates{
(0, 0.12)
(150, 0.15)
(330, 0.17)};
\addplot [black, mark=x, dotted] coordinates{
(0, 0.13)
(150, 0.14)
(330, 0.15)};
\end{axis}
\begin{axis}
[xlabel={{Zeit\,/\,min}},
ylabel={{Strom\,/\,A}},
enlarge x limits=0.01,
xmax=330,
ymin=0.15,ymax=0.55,
scale only axis,
axis y line=right,
axis x line=none]
\addplot [only marks, gray, mark=triangle*] coordinates{
(0, 0.15)
(150, 0.35)
(330, 0.54)};
\addplot [only marks, mark=x] coordinates{
(0, 0.17)
(150, 0.25)
(330, 0.35)};
\end{axis}
\end{tikzpicture}
\caption{Test dotted}
\end{figure}
\end{document}
[/code]