我的问题是以下内容的延续:GnuPlot 中的 3 维绘图,其中颜色是我数据文件中的第四列?. 我正在尝试对我的一些数据做基本相同的事情。但是,当我采用现有代码并将其应用到我的文本文件时,我只能在 Z=0 处获得一个表面,而在其他任何地方都没有。我在这里附上了我的图表。我有来自 z=[-80,80] 的数据。但是数据没有显示出来。代码有问题吗?
set term png enhanced font "/usr/share/fonts/liberation/LiberationSans-Regular.ttf" 12 size 1024,960
set title "ADO-N1-4D"
set output "ADO-N1-4D.png"
set dgrid3d 30,30
dataFile='ADO-N1-his.txt'
set table dataFile.'.grid'
splot dataFile u 1:2:3
unset table
set table dataFile.'.color'
splot dataFile u 1:2:4
unset table
set view 60,45
set hidden3d
set palette defined (0 "white" , 0.5 "light-green" ,1 "purple")
set autoscale cbfix
set pm3d
unset dgrid3d
set ticslevel 0
set xrange[2:9]
set yrange[-80:80]
set zrange[-80:80]
splot sprintf('< paste %s.grid %s.color', dataFile, dataFile) u 1:2:3:7 with pm3d notitle
附上样本数据文件:
2.25000 -32.50000 20.00000 0.03965 1
2.25000 -12.50000 0.00000 0.04143 1
2.35000 -32.50000 20.00000 0.03642 1
2.35000 -7.50000 0.00000 0.03734 1
2.35000 2.50000 0.00000 0.03672 1
2.35000 12.50000 40.00000 0.03703 1
2.45000 -27.50000 0.00000 0.03356 1
2.45000 -27.50000 40.00000 0.03523 1
2.45000 -22.50000 0.00000 0.06821 2
2.45000 -17.50000 0.00000 0.03356 1
2.45000 -17.50000 20.00000 0.03552 1
2.45000 -12.50000 20.00000 0.03383 1
2.45000 -2.50000 0.00000 0.03438 1
2.45000 -2.50000 20.00000 0.03523 1
2.45000 2.50000 20.00000 0.03383 1
2.45000 32.50000 40.00000 0.03438 1
2.55000 -32.50000 0.00000 0.03151 1
2.55000 -27.50000 0.00000 0.12730 4
2.55000 -22.50000 0.00000 0.18983 6
2.55000 -17.50000 -20.00000 0.03201 1
2.55000 -17.50000 0.00000 0.06329 2
2.55000 -17.50000 20.00000 0.03303 1
2.55000 -12.50000 0.00000 0.12586 4
2.55000 -12.50000 20.00000 0.03176 1
2.55000 -7.50000 -20.00000 0.03251 1
2.55000 -7.50000 0.00000 0.31962 10
2.55000 -7.50000 20.00000 0.06352 2
2.55000 -2.50000 -20.00000 0.06230 2
2.55000 -2.50000 0.00000 0.15911 5
2.55000 -2.50000 20.00000 0.03103 1
2.55000 2.50000 0.00000 0.03277 1
2.55000 2.50000 20.00000 0.03201 1
2.55000 17.50000 0.00000 0.03127 1
2.65000 -42.50000 0.00000 0.02920 1
2.65000 -37.50000 0.00000 0.05951 2
2.65000 -32.50000 -40.00000 0.03010 1
2.65000 -32.50000 -20.00000 0.03056 1
2.65000 -32.50000 0.00000 0.09077 3
2.65000 -27.50000 0.00000 0.15004 5
2.65000 -22.50000 -20.00000 0.05820 2
2.65000 -22.50000 0.00000 0.05820 2
2.65000 -17.50000 -20.00000 0.08852 3
2.65000 -17.50000 0.00000 0.23617 8
2.65000 -17.50000 20.00000 0.11838 4
2.65000 -12.50000 -20.00000 0.08850 3
2.65000 -12.50000 0.00000 0.29542 10
2.65000 -12.50000 20.00000 0.11531 4
2.65000 -7.50000 -20.00000 0.09009 3
2.65000 -7.50000 0.00000 0.26670 9
2.65000 -7.50000 20.00000 0.05996 2
2.65000 -2.50000 -20.00000 0.05798 2
2.65000 -2.50000 0.00000 0.26619 9
2.65000 -2.50000 20.00000 0.03033 1
2.65000 2.50000 0.00000 0.11996 4
2.65000 2.50000 20.00000 0.02899 1
2.65000 7.50000 20.00000 0.03079 1
2.65000 22.50000 60.00000 0.02942 1
2.75000 -52.50000 0.00000 0.02695 1
2.75000 -37.50000 0.00000 0.08303 3
2.75000 -32.50000 0.00000 0.30819 11
2.75000 -27.50000 -40.00000 0.02856 1
2.75000 -27.50000 -20.00000 0.08246 3
2.75000 -27.50000 0.00000 0.08364 3
2.75000 -22.50000 -60.00000 0.02835 1
2.75000 -22.50000 -40.00000 0.02695 1
2.75000 -22.50000 -20.00000 0.11157 4
2.75000 -22.50000 0.00000 0.22231 8
2.75000 -22.50000 20.00000 0.05389 2
2.75000 -17.50000 -40.00000 0.02695 1
2.75000 -17.50000 -20.00000 0.08342 3
2.75000 -17.50000 0.00000 0.21875 8
2.75000 -17.50000 20.00000 0.13895 5
2.75000 -12.50000 -20.00000 0.24895 9
2.75000 -12.50000 0.00000 1.04906 38
2.75000 -12.50000 20.00000 0.27828 10
2.75000 -12.50000 40.00000 0.02675 1
2.75000 -7.50000 -20.00000 0.13573 5
2.75000 -7.50000 0.00000 0.46686 17
2.75000 -7.50000 20.00000 0.13830 5
2.75000 -2.50000 -40.00000 0.02695 1
2.75000 -2.50000 -20.00000 0.08321 3
2.75000 -2.50000 0.00000 0.41596 15
2.75000 -2.50000 20.00000 0.02774 1
2.75000 2.50000 -20.00000 0.02734 1
2.75000 2.50000 0.00000 0.13750 5
2.75000 2.50000 20.00000 0.02734 1
2.75000 7.50000 -20.00000 0.08124 3
2.75000 7.50000 0.00000 0.08362 3
2.75000 12.50000 -20.00000 0.02734 1
2.75000 12.50000 0.00000 0.02695 1
2.75000 17.50000 20.00000 0.02754 1
2.85000 -57.50000 60.00000 0.02619 1
2.85000 -42.50000 -40.00000 0.02656 1
2.85000 -37.50000 0.00000 0.02494 1
2.85000 -32.50000 0.00000 0.02601 1
2.85000 -27.50000 -20.00000 0.07803 3
2.85000 -27.50000 20.00000 0.02564 1
2.85000 -22.50000 -20.00000 0.07623 3
2.85000 -22.50000 0.00000 0.10349 4
2.85000 -22.50000 20.00000 0.05041 2