\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}
\pgfplotsset{compat=1.4}

\usepgfplotslibrary{patchplots}
\pagestyle{empty}

\begin{document}
\pgfplotsset{show nodes/.style={nodes near coords=\coordindex,nodes near coords align={center}}}
	 \def\xA{0} \def\yA{0}
	 \def\xB{2} \def\yB{3}
	 \def\xC{5} \def\yC{4}
	 \def\xD{3} \def\yD{6}
	 \def\xE{0} \def\yE{7}
	 \def\xF{-1}\def\yF{4}
\begin{tikzpicture}
	\begin{axis}[title=PGFPlots triangle quadr (flat),show nodes,colorbar]
	\addplot[patch,patch type=triangle quadr,point meta=explicit] coordinates {
		(\xA,\yA) [1] 
		(\xC,\yC) [0]
		(\xE,\yE) [0]
		(\xB,\yB) [0]
		(\xD,\yD) [0]
		(\xF,\yF) [0]
	};
	\end{axis}
	\end{tikzpicture}
\end{document}
