我有一个依赖于phi和theta的函数,我想在球面上绘制它。 日期存储在一个.txt文件中,其中包含以下列:
1: x = R*sin(theta)*cos(phi)
2: y = R*sin(theta)*sin(phi)
3: z = R*cos(theta)
4: density
I use the following gnuplot code to plot:
set terminal wxt size 800,800
set mapping cartesian
set view equal xyz
set xlabel 'x'
set ylabel 'y'
set zlabel 'z'
splot "densityprofile_100.000.txt" u 1:2:3:4 with pm3d
pause -1
不幸的是,Gnuplot似乎无法正确表示球体上的颜色。似乎有一些阴影,我无法去掉它,可以参考这里的图片:
当我用鼠标旋转球体时,阴影会变小或变大,但没有一个位置使其完全消失。任何帮助都将不胜感激。
set autoscale cbfix
,这样颜色范围仅跨越您数据文件中确切的值。 - Christoph