Reputation: 1
I have some questions with plotting in 3D withe Gnuplot
I need to plot some data (from files) in spherical coordinates.
My data are organized as following,
azimuth zenith intensity
1 2 0.256e-2
2 2 0.156e-2
3 3 ...
I use:
splot "data.out" using 1:2:3
but the third column is used as a radius...so if I want to compare 2 different set of datas, with different intensity, my plot become unreadable
is there a way to fix the radius to a specific value instead of using the third column as radius?
Sorry for the long post (-: (and the mistakes...I'm not a native English speaker) Thanks a lot for your help Hyppie-Psi
Upvotes: 0
Views: 2164
Reputation: 2193
I'm not completely sure that I understand what you are looking for but you can
do some operation on the using 1:2:3
part. For instance, if you write
splot "data.out" using 1:2:(12.3)
you will have the z
coordinate of 12.3
for all your x
and y
points. You
can also do more complicated operations, like
splot "data.out" using 1:2:($3*$3)
where you square the third column of your data file. You can also for instance go in spherical coordinate by doing:
splot "data.out" using ($3*cos($1)*cos($2)):($3*sin($1)*cos($2)):($3*sin($2))
which, if I understood your question, is equivalent to simply
set mapping spherical
splot "data.out" using 1:2:3
With these informations, you should be able to perform any operation you like on your third column data to display in a way you like.
Upvotes: 0