I generate a .txt file containing four colums: X, Y and Z coordinates, as well as a scalar variable. The first three values in each row describes a unitary vector in 3D, to which the scalar value is associated.
I would like to plot the results as a coloured spherical surface. I cannot readily use pm3D as the data are in not in matrix format, that is, no blank space after jumps in the X coordinates. Moreover, there are hardly two identical X coordinates.
The best I could do is to use splot, with the palette option, which I understand would use the data in the 4th column to assign colors to each point.
Data to be plotted are saved in "star.txt", a simple text file with 4 columns, and up to 10.000 rows.
The Gnuplot script looks like
set terminal wxt size 800,800
set mapping cartesian
set view equal xyz
set xlabel 'x'
set ylabel 'y'
set zlabel 'z'
splot "star.txt" palette pointtype 7
pause -1
It would be great if there were a way to get smooth colour changes on the surface. At the moment it is not trivial to understand where a colour area is. Also, one could see through the points to the surface that is actually farther from the viewer.

