I have a function dependent on phi and theta, which I want to plot on the surface of a sphere. The date is stored in a .txt file with the columns:
1: x = R*s
At a guess, maybe the depth ordering is causing some trouble. Have you tried the pm3d "hidden3d" option?
from the gnuplot help on pm3d:
The option hidden3d takes as the argument a linestyle which must be created by set style line .... (The style need not to be present when setting pm3d, but it must be present when plotting). If set, lines are drawn using the specified line style, taking into account hidden line removal. This is by far more efficient than using the command set hidden3d as it doesn't really calculate hidden line removal, but just draws the filled polygons in the correct order. So the recommended choice when using pm3d is
set pm3d at s hidden3d 100 set style line 100 lt 5 lw 0.5 unset hidden3d unset surf splot x*x+y*y
I found the solution to my problem by adding the following line:
set pm3d depthorder