\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,listings,rotating}
\pgfplotsset{compat=newest}

\pagestyle{empty}

\begin{document}


\begin{tikzpicture}
\begin{axis}[
	tick align=outside,
	grid=both,
	title={maxlevel versus cgiter, see table}]
\addplot plot[
	error bars/.cd,
	y dir=both,y explicit,
] table[x=maxlevel,y=cgiter,y error=cgiter_err] {plotdata/pgfplotstest_plot.dat};

\end{axis}
\end{tikzpicture}

\begin{sidewaystable}
{%
\lstset{
	showtabs=true,
	showspaces=true,
	basicstyle=\footnotesize\ttfamily,
	numbers=left,
	numberblanklines=true,
	breaklines=false,
	tabsize=15}
\lstinputlisting{plotdata/pgfplotstest_plot.dat}
}
\caption{The table used for the plot table tests and error bars.}
\label{tbl:k}
\end{sidewaystable}
\end{document}
