2012-09-24 10:23:13 +02:00
|
|
|
\documentclass{article}
|
|
|
|
\usepackage[pdftex,active,tightpage]{preview}
|
|
|
|
\setlength\PreviewBorder{2mm}
|
|
|
|
\usepackage{pgfplots}
|
|
|
|
|
|
|
|
\begin{document}
|
|
|
|
\begin{preview}
|
|
|
|
\pgfplotsset{
|
|
|
|
colormap={whitered}{
|
|
|
|
color(0cm)=(white);
|
|
|
|
color(1cm)=(orange!75!red)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
\begin{tikzpicture}
|
|
|
|
\begin{axis}[
|
|
|
|
colormap name=whitered,
|
|
|
|
width=15cm,
|
|
|
|
view={335}{50},
|
|
|
|
enlargelimits=false,
|
|
|
|
grid=major,
|
|
|
|
domain=-2:2,
|
|
|
|
y domain=-2:2,
|
|
|
|
samples=55, %60 : TeX capacity exceeded, sorry [main memory size=3000000].
|
2012-09-24 13:07:38 +02:00
|
|
|
% see also http://tex.stackexchange.com/a/7954/5645
|
2012-09-24 10:23:13 +02:00
|
|
|
xlabel=$x$,
|
|
|
|
ylabel=$y$,
|
|
|
|
zlabel={$z$},
|
|
|
|
colorbar,
|
|
|
|
colorbar style={
|
|
|
|
at={(-0.1,0)},
|
|
|
|
anchor=south west,
|
|
|
|
height=0.25*\pgfkeysvalueof{/pgfplots/parent axis height},
|
|
|
|
title={$f(x,y)$}
|
|
|
|
}
|
2012-09-24 13:07:38 +02:00
|
|
|
]
|
2012-09-24 10:23:13 +02:00
|
|
|
\addplot3[surf] {x*y*y/(x*x+y*y*y*y)};
|
|
|
|
\end{axis}
|
|
|
|
\end{tikzpicture}
|
|
|
|
\end{preview}
|
|
|
|
\end{document}
|