我有一个包含4列(半径,x,y,z)的文件,每行包含一个球体的坐标及其半径。你能帮我在gnuplot中绘制这些球吗? (如果在gnuplot中不可能,你能推荐另一种绘图工具吗?)
答案 0 :(得分:4)
2D中有with circles
样式选项。在3D中,您可以将半径从文件传递到pointsize
选项。请考虑以下数据:
# radius, x, y, z
1 0 0 0
2 1 2 2
3 3 4 5
1 2 5 7
1 1 3 4
2 2 0 1
然后您可以这样绘制(ps
是pointsize
的缩写,pt
是pointtype
的缩写; pt 7
绘制圆圈):
splot "data" u 2:3:4:1 ps variable pt 7