\begin{tikzpicture} \begin{axis}[ scale only axis, width=0.8\textwidth, height=0.4\textwidth, xlabel ={Measurement point}, ylabel ={Distance in \si{\meter}}, legend pos=north east, xmajorgrids=true, %xminorgrids=true, ymajorgrids=true, %yminorgrids=true, enlarge x limits=false, %enlarge y limits=false, ] %\draw ({axis cs:7,0}|-{rel axis cs:0,1}) -- ({axis cs:7,0}|-{rel axis cs:0,0}); \addplot [color=black] table[x=X,y=GT,col sep=comma]{plots/data/BSTMean2.csv}; \addlegendentry{Groundtruth} \addplot [color=blue] table[x=X,y=MeanDist,col sep=comma]{plots/data/BSTMean2.csv}; \addlegendentry{Mean distance} \addplot [color=orange, mark=x, only marks, mark size=1pt] table[x=X,y=Y,col sep=comma]{plots/data/BSTData2.csv}; \addlegendentry{Measured distance} \end{axis} \end{tikzpicture}