We want to generate a scatter plot: assume that we are given a couple of special (x; y) coordinates along with color data at every vertex. We would like to draw markers at the positions and choose individual colors depending on the color data.

The code is from the PGFPlots 1.10 manual: “3.4 Use Cases involving Scatter Plots”.

Scatter plot

\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotsset{width=7cm,compat=1.8}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
	enlargelimits=false,
	colorbar,
]
\addplot+[
	only marks,
	scatter,
	point meta={ln(1e-6+abs(\thisrow{f(x)}))/ln(10)},
	mark size=0.6pt,
]
table
	{concat_VV_together_grid.dat};
\end{axis}
\end{tikzpicture}
\end{document}
Click to download: scatter-plot.texscatter-plot.pdf