\documentclass{article}
% translate with >> pdflatex -shell-escape <file>

% This file is used as unit test for pgfplots, copyright by Christian Feuersaenger.
% 
% See
%   http://pgfplots.sourceforge.net/pgfplots.pdf
% for pgfplots.
%
% Any required input files (for <plot table> or <plot file> or the table package) can be downloaded
% at
% http://www.ctan.org/tex-archive/graphics/pgf/contrib/pgfplots/doc/latex/
% and
% http://www.ctan.org/tex-archive/graphics/pgf/contrib/pgfplots/doc/latex/plotdata/

\usepackage{pgfplots,pgfplotstable}
\pgfplotsset{compat=newest}

\pagestyle{empty}

\begin{document}
\long\def\testcolsep#1{%
	\pgfplotstabletypeset[col sep=#1]{plotdata/pgfplotstest_#1.dat}

	\begin{tikzpicture}
	\begin{axis}[
		title={col sep=#1.},
	]
	\addplot table[x=x,y=y,col sep=#1]{plotdata/pgfplotstest_#1.dat};

	\end{axis}
	\end{tikzpicture}
}
\testcolsep{comma}

\testcolsep{semicolon}

\testcolsep{colon}

\testcolsep{ampersand}

\testcolsep{braces}

	\pgfplotstabletypeset[col sep=tab]{plotdata/pgfplotstest_tab.dat}

	\begin{tikzpicture}
	\begin{axis}[
		title={col sep=tab.},
	]
	\addplot table[x=a long x name,y=y,col sep=tab]{plotdata/pgfplotstest_tab.dat};

	\end{axis}
	\end{tikzpicture}

\subsection{the same with active characters}
{
	\catcode`\;=13
	\def\testcolsep#1{%
		\begin{tikzpicture}
		\begin{axis}[
			title={col sep=#1.},
		]
		\addplot table[x=x,y=y,col sep=#1]{plotdata/pgfplotstest_#1.dat};

		\end{axis}
		\end{tikzpicture}
	}
	\testcolsep{semicolon}

	\catcode`\:=13
	\testcolsep{colon}
}
\end{document}
