von esdd » Mo 7. Nov 2016, 11:43
Bitte erstelle immer ein kurzes, aber lauffähiges
Minimalbeispiel. Bei Dir fehlen insbesondere Daten, die geplottet werden sollen. Außerdem beim Einfügen von Code bitte den Codebutton nutzen und das Ergebnis in der Vorschau ansehen.
Du kannst eventuell symbolic x coords nutzen. Ob das möglich ist, hängt aber von Deinen Daten ab.
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[width=0.9\textwidth,height=0.4\textheight, legend pos=south east,
xlabel={Hydratationsdauer in Tagen$\sqrt{t}$},
ylabel={(Na$^2$ + K$^+$)$-$ Konzentration in mmol/l},
xmin=0, xmax=180,
ymin=13, ymax=13.9,
symbolic x coords={0.25,1,2,7,28,56,91,180},
xtick={0.25,1,2,7,28,56,91,180},% Alternative, wenn im ersten Plot alle vorhanden: xtick=data
xmin=0.25,xmax=180,
enlarge x limits=.1,
x tick label style={/pgf/number format/1000 sep=},
y tick label style={/pgf/number format/1000 sep=},
ytick={{13.3},{13.6},{13.8},{13.9}},
ymin=13,ymax=14,% Angabe notwendig, da keine Daten vorhanden
%extra y ticks={15, 17},
%extra y tick labels={{15},{17}},
extra y tick style={grid=major,
tick label style={xshift=-1cm}},
grid=both]
%\addplot [black,line width=1pt] table {Diagramme/schaeferph1.csv};
%\addplot [dash pattern=on 4pt off 2pt on 2pt off 1pt,line width=1pt] table {Diagramme/schaeferph2.csv};
%\addplot [dash pattern=on 2pt off 1pt on 2pt off 1pt,line width=1pt] table {Diagramme/schaeferph3.csv};
%\addplot [dash pattern=on 5pt off 2pt,line width=1pt ] table {Diagramme/schaeferph4.csv};
%\legend{%
%Referenzmischung,
%20 M.-\% SFA,
%40 M.-\% SFA,
%60 M.-\% SFA
%}
\end{axis}
\end{tikzpicture}
\end{document}
Bitte erstelle immer ein kurzes, aber lauffähiges [m][/m]. Bei Dir fehlen insbesondere Daten, die geplottet werden sollen. Außerdem beim Einfügen von Code bitte den Codebutton nutzen und das Ergebnis in der Vorschau ansehen.
Du kannst eventuell [tt]symbolic x coords[/tt] nutzen. Ob das möglich ist, hängt aber von Deinen Daten ab.
[code]\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[width=0.9\textwidth,height=0.4\textheight, legend pos=south east,
xlabel={Hydratationsdauer in Tagen$\sqrt{t}$},
ylabel={(Na$^2$ + K$^+$)$-$ Konzentration in mmol/l},
xmin=0, xmax=180,
ymin=13, ymax=13.9,
symbolic x coords={0.25,1,2,7,28,56,91,180},
xtick={0.25,1,2,7,28,56,91,180},% Alternative, wenn im ersten Plot alle vorhanden: xtick=data
xmin=0.25,xmax=180,
enlarge x limits=.1,
x tick label style={/pgf/number format/1000 sep=},
y tick label style={/pgf/number format/1000 sep=},
ytick={{13.3},{13.6},{13.8},{13.9}},
ymin=13,ymax=14,% Angabe notwendig, da keine Daten vorhanden
%extra y ticks={15, 17},
%extra y tick labels={{15},{17}},
extra y tick style={grid=major,
tick label style={xshift=-1cm}},
grid=both]
%\addplot [black,line width=1pt] table {Diagramme/schaeferph1.csv};
%\addplot [dash pattern=on 4pt off 2pt on 2pt off 1pt,line width=1pt] table {Diagramme/schaeferph2.csv};
%\addplot [dash pattern=on 2pt off 1pt on 2pt off 1pt,line width=1pt] table {Diagramme/schaeferph3.csv};
%\addplot [dash pattern=on 5pt off 2pt,line width=1pt ] table {Diagramme/schaeferph4.csv};
%\legend{%
%Referenzmischung,
%20 M.-\% SFA,
%40 M.-\% SFA,
%60 M.-\% SFA
%}
\end{axis}
\end{tikzpicture}
\end{document}[/code]