Home creating a 3d sphere scatter plot in mathgl using a datafile
Reply: 1

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

Yotam
1#
Yotam Published in 2011-03-07 11:00:59Z

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.

abalakin
2#
abalakin Reply to 2011-05-31 04:18:29Z

Just draw spheres in the cycle.

for(long i=0;i<n;i++)
  gr->Sphere(mglPoint(x[i],y[i],z[i]),r[i]);
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.328164 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO