Is it possible in latex to directly round off numbers from tables before plotting? I tried using round-precision from siunitx package, but this does not seem to work.
MWE
\documentclass{standalone}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotsset{compat=newest}
\usepackage{siunitx}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel= x,
ylabel=y]
\addplot[only marks, color=black,mark=square*] table [y=y[round-precision=0], x=x]{test.txt};
\end{axis}
\end{tikzpicture}
\end{document}
The data table
x y
1 1.2
2 1.56
3 1.559
4 1.07
