With pgfplot when plotting data over a small range of integers, some integers are shown multiple times to "fill" the horizontal axis. I wonder if it is possible to show only discrete integers. Since I automate the generation of figures I don't want to set the ticks manually.
Heres my example code:
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\usepackage{filecontents}
\begin{filecontents*}{values.csv}
int,value
1, 3.2
2, 6.5
4, 6.8
\end{filecontents*}
\begin{document}
\begin{tikzpicture}
\centering
\begin{axis}[
grid=both,
enlarge x limits=false,
xlabel={Integers},
ylabel={Value},
x tick label style={
/pgf/number format/.cd,
precision=0,
},
]
\addplot table [x=int, y=value, col sep=comma] {values.csv};
\end{axis}
\end{tikzpicture}
\end{document}


