I have a sorted data in a file (named data.dat). These data should be plotted vertically. I prepared a code in latex using tikz that works. The problem is each data is typed one by one in the main body of the code and I need a way in which I call the data file and each data is substituted one by one. Here is my code
\documentclass[border= 5 pt]{standalone}
\usepackage{times,comment}
\usepackage{graphicx}
\usepackage{tikz}
\newcommand{\point}[1]{
\draw [<->,purple] ( 0 , #1 ) node[yshift=0,left,font=\tiny]{ #1 } -- ( 1 , #1 ) node[yshift=0,right,font=\tiny]{ #1 } ; }
\begin{document}
\begin{tikzpicture}[scale=1]
\point{0}
\point{1}
\point{2}
\point{2.5}
\point{3.4}
\point{4}
\point{5.8}
\point{6.9}
\point{7.5}
\end{tikzpicture}
\end{document}
The data file can be download from here.