Hier ist eine Lösung von
Jake:
\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\usetikzlibrary{arrows, decorations.markings}
\makeatletter
\tikzset{
nomorepostaction/.code=\makeatletter\let\tikz@postactions\pgfutil@empty,
my axis/.style={
postaction={
decoration={
markings,
mark=at position 1 with {
\arrow[ultra thick]{latex}
}
},
decorate,
nomorepostaction
},
thin,
-, % switch off other arrow tips
every path/.append style=my axis % this is necessary
%so it works both with "axis lines=left" and "axis lines=center"
}
}
\makeatother
\begin{document}
\begin{tikzpicture}
\centering
\begin{axis}[
xlabel={y},
ylabel={z},
ymax=1,
xticklabel={\ifdim\tick pt=0pt \else\pgfmathprintnumber{\tick}\fi},
grid=major,
domain=0:5,
samples=1000,
width=\textwidth,
height = 8cm,
axis lines=left,
axis line style={my axis},
%heigth=5cm,
legend pos=north west,
]
\addplot[red,line width=1.5pt] {mod(\x,1)<1? mod(\x,1)/5:0};
\addlegendentry{1};
\addplot[blue,line width=1.5pt]{0.2*x};
\addlegendentry{2};
\end{axis}
\end{tikzpicture}
\end{document}
Stefan
PS: bitte nicht doppelt die gleiche Frage posten, ich muss jedes Mal die redundante Kopie löschen. Wenn Du ein Thema "nach oben holen" möchtest, dann antworte im originalen Thema mit einer Nachfrage und vllt. schonmal einem Lösungs-Ansatz.