Gnuplot 如何在pm3d地图上绘制由数学公式给出的新线

Gnuplot 如何在pm3d地图上绘制由数学公式给出的新线,gnuplot,Gnuplot,ENV gnuplot 5.0补丁级别1 ,, 用代码和他的小数据 set term postscript enhanced color set output "gc4-4.eps" set pm3d map interpolate 10,10 set palette rgbformulae 22,13,-31 sp 'file.dat', 'points.dat' using 1:2:(0) with lines 此外,还有类似的解决方案。但是他们使用数据文件而不是数学公式 我也试过, 尝试

ENV

gnuplot 5.0补丁级别1

,, 用代码和他的小数据

set term postscript enhanced color
set output "gc4-4.eps"
set pm3d map interpolate 10,10
set palette rgbformulae 22,13,-31
sp 'file.dat', 'points.dat' using 1:2:(0) with lines
此外,还有类似的解决方案。但是他们使用数据文件而不是数学公式

我也试过,

尝试未设置曲面、显式设置曲面、打印。。。无表面。 . 这些似乎是3d坐标的解决方案

我仍然没有得到预期的结果

我错过什么了吗?先谢谢你

我的代码如下:

set term postscript enhanced color
set output "g.eps"
set multiplot layout 1,2 
set pm3d map explicit interpolate 10,10
set palette rgbformulae 22,13,-31
#set contour
#set cntrparam levels incr 0,0.1,0.1
#set linetype 2 linecolor rgb "white" linewidth 2
set tics scale 0.5 
set label 1 '(a)' at graph -0.3,1 front
set xlabel "x" 
set ylabel "{/Symbol y}" 
set xtics 0.8,1.0,2.8
set xrange [0.8:2.8]
set ytics 0.1,0.1,0.9
set yrange [0.1:0.9]
set size 0.4,0.4
#unset surface
#set surface explicit
fx(x) = (x-1.8)**2+0.1
sp "s.data" u 1:2:3 with pm3d notit, fx(x) with line linetype 2 linecolor rgb "white" linewidth 2 tit "line"
#plot fx(x) with lines linetype 2 linecolor rgb "black" linewidth 2 tit "line"
plot fx(x) with lines linetype 2 linecolor rgb "black" linewidth 2 tit "line"
set label 1 '(b)' at graph -0.3,1 front
set xlabel "x"
set ylabel "{/Symbol y}"
set xtics 0.1,0.1,0.9
set xrange [0.1:0.9]
set ytics 0.8,1.0,2.8
set yrange [0.8:2.8]
set size 0.4,0.4
unset surface
set surface explicit
fx(x) = -(2*x-1)**2+1.8
sp "s.data" u 2:1:3 notit, fx(x) with lines linetype 2 linecolor rgb "white" linewidth 2 nosurface tit "line"
#plot fx(x) with lines linetype 2 linecolor rgb "black" linewidth 2 tit "line"
#sp "data/s2.data" u 2:1:3  notit
我的
s.data的迷你数据

# x y z
0.8 0.1 0.3 
0.8 0.2 0.2 
0.8 0.3 0.1 
0.8 0.4 0
0.8 0.5 0
0.8 0.6 0
0.8 0.7 0
0.8 0.8 0
0.8 0.9 0

1.8 0.1 0.3 
1.8 0.2 0.2 
1.8 0.3 0.1 
1.8 0.4 0.2 
1.8 0.5 0.3 
1.8 0.6 0.4 
1.8 0.7 0.4 
1.8 0.8 0.5 
1.8 0.9 0.5 

2.8 0.1 0.3 
2.8 0.2 0.4 
2.8 0.3 0.5
2.8 0.4 0.5
2.8 0.5 0.6
2.8 0.6 0.6
2.8 0.7 0.6
2.8 0.8 0.7
2.8 0.9 0.7

#

如果您知道如何在pm3d地图上绘制数据文件,则可以使用
table
命令将函数绘制到数据文件中:

set table "temp_f.dat"
set samples 1000
fx(x) = (2*x-1)**2+1.8
plot fx(x)
unset table

set pm3d map explicit interpolate 10,10
set xrange [0.1:0.9]
set yrange [0.8:2.8]
splot "s.data" u 2:1:3, "temp_f.dat" u 1:2:(0) notitle with lines lw 2 lc 0
结果是: