![tikz 软件包错误:放弃此路径。您忘记了分号吗?\end{axis}](https://linux22.com/image/332901/tikz%20%E8%BD%AF%E4%BB%B6%E5%8C%85%E9%94%99%E8%AF%AF%EF%BC%9A%E6%94%BE%E5%BC%83%E6%AD%A4%E8%B7%AF%E5%BE%84%E3%80%82%E6%82%A8%E5%BF%98%E8%AE%B0%E4%BA%86%E5%88%86%E5%8F%B7%E5%90%97%EF%BC%9F%5Cend%7Baxis%7D.png)
\begin{tikzpicture}
\begin{axis}[%
axis equal,
width=8in,
height=8in,
axis lines = center,
xlabel = {$x$},
ylabel = {$y$},
zlabel = {$z$},
xmax=5,
ymax=5,
zmax=6,
ticks=none,
enlargelimits=0.3,
view={135}{45},
scale uniformly strategy=units only,
]
\addplot3[%
opacity = 0.5,
surf,
z buffer = sort,
samples = 21,
variable = \u,
variable y = \v,
domain = 0:5,
y domain = 0:360,
]
(u*cos v,u*sin v,sqrt(25-u*u) );
\end{axis}
\end{tikzpicture}
答案1
您的平方根括号过早终止了命令。您需要通过括号将其隐藏
(u*cos v,u*sin v,{sqrt(25-u*u)} );