\documentclass[11pt]{article} \usepackage[T1]{fontenc} \usepackage{pgfplots} \pgfplotsset{compat=1.12} % Wenn nötig, Versionsnummer runter oder auf »newest« setzen \begin{document} \begin{figure} \begin{tikzpicture} \begin{axis}[ width=14cm, height=10cm, scale only axis, xmin=0, xmax=400, xlabel={Normalspannung $\sigma$ in [$\frac{kN}{m^2}$]}, ymin=0, ymax=200, ylabel={Scherspannung $\tau$ $\frac{kN}{m^2}$}, axis x line*=bottom, %top, axis y line*=left, grid=major, every axis plot/.append style={ line width=1.5pt, mark size=2pt, mark=ball,forget plot, visualization depends on={x \as \myvalue}, }, point meta=y, nodes near coords={ \ifdim \myvalue pt=125pt \pgfmathprintnumber{\pgfplotspointmeta}\fi \ifdim \myvalue pt=250pt \pgfmathprintnumber{\pgfplotspointmeta}\fi \ifdim \myvalue pt=375pt \pgfmathprintnumber{\pgfplotspointmeta}\fi }, nodes near coords style={text=black} ] \addplot [red] table[restrict expr to domain={\thisrowno{0}}{125:125}] {datenNS.dat}; \addplot [green] table[restrict expr to domain={\thisrowno{0}}{125:375}] {datenNS.dat}; \addplot [blue] table[restrict expr to domain={\thisrowno{0}}{375:375}] {datenNS.dat}; \end{axis} \end{tikzpicture} \caption{Normal-Scherspannungs - Diagramm} \end{figure} \end{document}