I'm using domain=min:max within pgfplots, but unless I provide the same limits to gnuplot explicitly, they are ignored and gnuplot proceeds with plotting in the range [-10,10] (I assume that is the default range). Is there any way I can have gnuplot inherit the domain limits? If not, is there a way to pass them to gnuplot using\pgfkeysvalueof{<whatever>}?
MWE:
\documentclass{article}
\usepackage{tikz,pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
domain=-2:2,]
\addplot3[raw gnuplot,surf,samples=20,]
gnuplot[surf,] {%
splot [-2:2] [-2:2] (1-x)^2 + 100*(y-x^2)^2
% splot (1-x)^2 + 100*(y-x^2)^2 % This defaults in the range [-10,10].
};
\end{axis}
\end{tikzpicture}%
\end{document}

gnuplotlike this:\addplot3[contour gnuplot={number{20},labels=true},samples=40,thick,] {x^2+y^2};? – sudosensei Sep 16 '13 at 16:04domainkey:\addplot3[domain=-5:5, contour gnuplot={number={20},labels=true},samples=10,thick] {x^2+y^2};. You only need that\pgfkeysvalueofapproach if you're usingraw gnuplot. – Jake Sep 16 '13 at 16:08raw gnuplotignores the values. Everything makes much more sense now. Thank you so much. – sudosensei Sep 16 '13 at 16:10