I have a file with 4 columns (radius,x,y,z) that contains on each line the coordinates of a sphere and its radius. Could you please help me to plot these spheres in gnuplot? ( If it is not possible in gnuplot, could you recommend another plotting tool?)
1 Answers
5
votes
There is a with circles style option in 2D. In 3D you can pass the radius from the file to the pointsize option. Consider the following data:
# 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
Then you can plot it like this (ps is short for pointsize and pt is short for pointtype ; pt 7 draws circles):
splot "data" u 2:3:4:1 ps variable pt 7
