von quietscheentchen » Fr 29. Jan 2016, 14:23
Hallo,
ersetze die Zeilen
every axis x label/.style={
at={(ticklabel* cs:1.05)},
anchor=west,
},
every axis y label/.style={
at={(ticklabel* cs:1.05)},
anchor=south,
},
ytick={10, 100},
durch
yticklabels={50,100,200},
ytick={50,100,200},
Außerdem solltest du noch etwas wie
einfügen, damit die Beschriftung 50 überhaupt angezeigt wird.
Der fertige Code ist dann:
\documentclass[12pt]{scrartcl}
\usepackage[paperwidth=18cm, paperheight=12cm]{geometry}
%Digrammzeug
\usepackage{pgfplots}
\begin{document}
\thispagestyle{empty} % um die Seitenzahl zu endfernen
\newgeometry{left=0.1cm, right=0.1cm, top=0.1cm, bottom=0.1cm}
\begin{figure}
\centering
\begin{tikzpicture}
\begin{loglogaxis}[
axis x line=bottom,
axis y line=left,
ymax = 2.1*10^2,
ymin = 49,
xlabel=N (log),
ylabel=$ \mathrm{S_a} $ in MPa (log),
yticklabels={50,100,200},
ytick={50,100,200},
scale=1.6,
grid=both,
tick align=outside,
tickpos=left,
]
%Lasth 1
\node at (axis cs: 10^5.25,10^2.193) {Lasthorizont I};
%Lasth 2
\node at (axis cs: 10^6.2,10^1.955) {Lasthorizont II};
%Lasth 1 - 2 Gerade
\addplot[black, mark=square*] coordinates { (50966, 155.74) (477468, 90.16)};
%Lasth 2 - N_D Gerade
\addplot[black,no marks] coordinates { (477468, 90.16) (2.5*10^6, 60.16677272)};
%Dauerfestigkeit
\addplot[black, mark=square*, mark indices={1}] coordinates { (2.5*10^6, 60.16677272) (10^7, 60.16677272)};
\addplot[black, dotted, no marks] coordinates { (2.5*10^6, 60.16677272) (10^7.3, 60.16677272) };
\addplot[black, dashed] coordinates { (10^4, 60.16677272) (2.5*10^6, 60.16677272) };
%Beschriftung
\addplot[dashed] coordinates { (2.5*10^6, 60.16677272) (2.5*10^6, 10^1.7)};
\node at (axis cs: 10^5.4,10^1.85) {Zeitfestigkeit};
\node at (axis cs: 10^5.4,10^1.74) {Dauerfestigkeit};
\node at (axis cs: 10^6.85,10^1.73) {$ N_D=2,5\cdot10^6 $};
\node at (axis cs: 10^4.4,10^1.8) {$ S_{aD} \approx $ 60.17};
%Lasthorizont III
\addplot[black, thick, mark=x] coordinates {(180000, 117.49)};
\node at (axis cs: 10^5.8, 10^2.07) {Lasthorizont III};
\end{loglogaxis}
\end{tikzpicture}
\end{figure}
\end{document}
Hallo,
ersetze die Zeilen
[code] every axis x label/.style={
at={(ticklabel* cs:1.05)},
anchor=west,
},
every axis y label/.style={
at={(ticklabel* cs:1.05)},
anchor=south,
},
ytick={10, 100}, [/code]
durch
[code]yticklabels={50,100,200},
ytick={50,100,200}, [/code]
Außerdem solltest du noch etwas wie [code]ymin = 49,[/code] einfügen, damit die Beschriftung 50 überhaupt angezeigt wird.
Der fertige Code ist dann:
[code]\documentclass[12pt]{scrartcl}
\usepackage[paperwidth=18cm, paperheight=12cm]{geometry}
%Digrammzeug
\usepackage{pgfplots}
\begin{document}
\thispagestyle{empty} % um die Seitenzahl zu endfernen
\newgeometry{left=0.1cm, right=0.1cm, top=0.1cm, bottom=0.1cm}
\begin{figure}
\centering
\begin{tikzpicture}
\begin{loglogaxis}[
axis x line=bottom,
axis y line=left,
ymax = 2.1*10^2,
ymin = 49,
xlabel=N (log),
ylabel=$ \mathrm{S_a} $ in MPa (log),
yticklabels={50,100,200},
ytick={50,100,200},
scale=1.6,
grid=both,
tick align=outside,
tickpos=left,
]
%Lasth 1
\node at (axis cs: 10^5.25,10^2.193) {Lasthorizont I};
%Lasth 2
\node at (axis cs: 10^6.2,10^1.955) {Lasthorizont II};
%Lasth 1 - 2 Gerade
\addplot[black, mark=square*] coordinates { (50966, 155.74) (477468, 90.16)};
%Lasth 2 - N_D Gerade
\addplot[black,no marks] coordinates { (477468, 90.16) (2.5*10^6, 60.16677272)};
%Dauerfestigkeit
\addplot[black, mark=square*, mark indices={1}] coordinates { (2.5*10^6, 60.16677272) (10^7, 60.16677272)};
\addplot[black, dotted, no marks] coordinates { (2.5*10^6, 60.16677272) (10^7.3, 60.16677272) };
\addplot[black, dashed] coordinates { (10^4, 60.16677272) (2.5*10^6, 60.16677272) };
%Beschriftung
\addplot[dashed] coordinates { (2.5*10^6, 60.16677272) (2.5*10^6, 10^1.7)};
\node at (axis cs: 10^5.4,10^1.85) {Zeitfestigkeit};
\node at (axis cs: 10^5.4,10^1.74) {Dauerfestigkeit};
\node at (axis cs: 10^6.85,10^1.73) {$ N_D=2,5\cdot10^6 $};
\node at (axis cs: 10^4.4,10^1.8) {$ S_{aD} \approx $ 60.17};
%Lasthorizont III
\addplot[black, thick, mark=x] coordinates {(180000, 117.49)};
\node at (axis cs: 10^5.8, 10^2.07) {Lasthorizont III};
\end{loglogaxis}
\end{tikzpicture}
\end{figure}
\end{document}[/code]