开发者

creating a 3d sphere scatter plot in mathgl using a datafile

开发者 https://www.devze.com 2023-02-15 10:50 出处:网络
I\'m trying to create a 3d scatter plot with spheres us开发者_Go百科ing a data file of the format:

I'm trying to create a 3d scatter plot with spheres us开发者_Go百科ing a data file of the format:

X Y Z val \n 0 0 0 1 \n 0 0 1 0 \n 0 0 2 0 \n 0 0 3 0 \n . . .

I can read the file but I can't seem to find any where how to plot a set of spheres using matrix

(my goal is to get something like this)

P.S.

If any of you know how to get the same plot using gnuplot or any other command line/script file tool I'll be happy.


Just draw spheres in the cycle.

for(long i=0;i<n;i++)
  gr->Sphere(mglPoint(x[i],y[i],z[i]),r[i]);
0

精彩评论

暂无评论...
验证码 换一张
取 消