答案1
您可以使用 pgfplots 包。有关更多信息,请参阅本网站上的指南:https://nl.sharelatex.com/learn/Pgfplots_package。
我希望这有帮助:)
答案2
Asymptote
版本:
//
// localmax3d.asy
//
// to get localmax3d.png, run
// asy -f png -render=4 localmax3d.asy
//
import graph3;
size(200,0);
currentprojection=orthographic(camera=(-70,20,30),up=(0.4,-0.1,1),target=Z-Z,zoom=0.6);
triple fs1(pair t){
real u=t.x, v=t.y;
return (v*cos(2*pi*u),v*sin(2*pi*u),-4*v^2*cos(pi/2*v));
}
real eps=1e-4;
surface s1=surface(fs1,(eps,eps),(1,1),nu=12,nv=200,usplinetype=Spline);
draw(s1,paleblue+opacity(0.4),meshpen=nullpen,render(merge=true));
dot(fs1(0));
label("Local maximum",fs1(0),Z);
label("\noindent No global\\ maximum",fs1((0.25,0.75))+(0,0.5,0));