On 01/11/2010 19:34, Stefan Schulze Frielinghaus wrote:
> Hi Joseph
>
> On Sa, 2010-10-30 at 16:51 +0100, Joseph Wright wrote:
>> Did you try varying the other corners of each square? From my quick
>> tests, I think that the colour is based on the average of the four
>> corners. So in your case everything is moved up as three of the four
>> corners are big values and only one is zero.
>
> Hmm but that would mean, that the color of the plot would differ from
> the colorbar, too. Nevertheless, I tried that and more or less the same
> result showed up, except of the two other corners which I changed to
> z=0.0
>
> Any other idea? I'm kinda out of luck with this. In a *bigger* example
> GNUPlot comes up with a dark blue diagonal as expected so I guess this
> is a PGFPlots thing.
>
> Best regards,
> Stefan

Reading the manual, I find the option 'shader = flat corner', which 
seems to be what you want:

\documentclass{minimal}

\usepackage{tikz}
\usepackage{pgfplots}

\pgfplotsset{compat=1.3}

\begin{document}
\begin{tikzpicture}
\begin{axis}[view={0}{90}, colorbar]
     \addplot3[surf, shader = flat corner] file {test.dat};
\end{axis}
\end{tikzpicture}
\end{document}
--
Joseph Wright

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Pgfplots-features mailing list
Pgfplots-features@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgfplots-features

Reply via email to