![pgfplots:如何在球面添加直线](https://linux22.com/image/466180/pgfplots%EF%BC%9A%E5%A6%82%E4%BD%95%E5%9C%A8%E7%90%83%E9%9D%A2%E6%B7%BB%E5%8A%A0%E7%9B%B4%E7%BA%BF.png)
我想说明一下:光在1秒内传播的距离相当于绕地球7.5圈的距离。
\documentclass[margin=5mm, tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
axis equal,
width=10cm,
height=10cm,
axis lines = center,
xlabel = {$x$},
ylabel = {$y$},
zlabel = {$z$},
ticks=none,
enlargelimits=0.3,
view/h=45,
scale uniformly strategy=units only,
]
\addplot3[%
surf,
%opacity = 0.2,
colormap={bw}{color=(lightgray) color=(lightgray)},% lines 1/2
ultra thin,% lines 2/2
color=gray!22, % surface
z buffer = sort,
samples =33,
variable = \u, variable y = \v,
domain = 0:180, y domain = 0:360,
]
({cos(u)*sin(v)}, {sin(u)*sin(v)}, {cos(v)});
end{axis}
\end{tikzpicture}
\end{document}