I am trying to plot data on a spherical surface with a color display thanks to GNUPLOT.
The data I get is the result of a calculation I do for a latitude (hence the sphere to plot it). So I have one value per latitude, and I do the calculation for 35 latitudes -> 35 different values.
So I wrote in file 'Data.txt' in the following way to be able to plot:
The 1st column corresponds to longitudes ranging from -180 ° to + 180 ° in steps of 5 ° in radians. We travel this range from -180 ° to + 180 ° 35 times.
The 2nd column corresponds to latitudes ranging from -90 ° to + 90 ° in 5 ° steps. We have a different value for each longitude "cycle".
The 3rd column corresponds to the values that I want to plot. We always have a different value for each longitude "cycle".
Hello,
I am trying to plot data on a spherical surface with a color display thanks to GNUPLOT.
The data I get is the result of a calculation I do for a latitude (hence the sphere to plot it). So I have one value per latitude, and I do the calculation for 35 latitudes -> 35 different values.
So I wrote in file 'Data.txt' in the following way to be able to plot:
The 1st column corresponds to longitudes ranging from -180 ° to + 180 ° in steps of 5 ° in radians. We travel this range from -180 ° to + 180 ° 35 times.
The 2nd column corresponds to latitudes ranging from -90 ° to + 90 ° in 5 ° steps. We have a different value for each longitude "cycle".
The 3rd column corresponds to the values that I want to plot. We always have a different value for each longitude "cycle".
-3.1415926499999998 -1.4835298625000002 130.03860000000000
-3.0543261875000005 -1.4835298625000002 130.03860000000000
-2.9670597250000004 -1.4835298625000002 130.03860000000000
-2.8797932624999998 -1.4835298625000002 130.03860000000000
The first two columns draw a sphere well when I use:
gnuplot> set mapping spherical
gnuplot> splot "Data.txt" u 1: 2
First problem ... The sphere does not trace itself on the surface even when I add before drawing it:
gnuplot> set surface
I still persevered (in the wrong direction no doubt) to draw the third column in color.
I tried with pm3d:
gnuplot> set mapping spherical
gnuplot> set surface
gnuplot> set pm3d at ss
gnuplot> set colorbox
gnuplot> splot "Data.txt" u 1: 2: 3 with pm3d
The figure I get is empty, and the axes I get are no longer the right ones ...
In addition I have the following message:
Warning: Single isoline (scan) is not enough for a pm3d plot.
Hint: Missing blank lines in the data file? See 'help pm3d' and FAQ.
I pass on my values to you if you ever wish to try a plot:
130.03860000000000
134.31940000000000
137.83470000000000
140.88120000000001
143.59970000000001
146.03700000000001
143.91220000000001
145.13079999999999
146.52130000000000
147.84930000000000
149.06790000000001
150.14590000000001
151.05210000000000
151.81760000000000
152.41130000000001
152.81750000000000
153.08310000000000
153.16130000000001
153.08310000000000
152.81750000000000
152.41130000000001
151.81760000000000
151.05210000000000
150.14590000000001
149.06790000000001
147.84930000000000
146.52130000000000
145.13079999999999
143.91220000000001
146.03700000000001
143.59970000000001
140.88120000000001
137.83470000000000
134.31940000000000
130.03860000000000
I hope I have well explained my problem to you.
If ever you have a simpler way or a solution (s) to my problems it will be with pleasure
Any help is welcome !
Thank you in advance :)