0

I'm trying to create a 3d scatter plot with spheres using 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.

Pang
  • 9,564
  • 146
  • 81
  • 122
Yotam
  • 10,295
  • 30
  • 88
  • 128

1 Answers1

0

Just draw spheres in the cycle.

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