Gnuplot-在二维等高线图上绘制数据点
我想将一些数据点()绘制到二维轮廓投影上(由上的数据生成) 我在这些帖子上找到了类似的答案:, ,但不幸的是,在我的情况下,这些似乎不起作用 首先,我设置选项:Gnuplot-在二维等高线图上绘制数据点,gnuplot,heatmap,contour,Gnuplot,Heatmap,Contour,我想将一些数据点()绘制到二维轮廓投影上(由上的数据生成) 我在这些帖子上找到了类似的答案:, ,但不幸的是,在我的情况下,这些似乎不起作用 首先,我设置选项: set pm3d explicit unset surface # Switch off the surface set view map # Set a bird eye (xy plane) view set contour # Plot contour lines set
set pm3d explicit
unset surface # Switch off the surface
set view map # Set a bird eye (xy plane) view
set contour # Plot contour lines
set key outside
set cntrparam cubicspline # smooth out the lines
unset colorbox
然后我用splot命令绘图:
splot 'Contours.txt' using 1:2:3 notitle with pm3d,\
'M_Coord_Plain.txt' with points nocontour using 1:2:(0) pt 7
生成的绘图仅为轮廓二维投影,但没有点,也没有错误。最后它成功了,但必须进行以下更改:
set pm3d explicit
set surface
set view map # Set a bird eye (xy plane) view
set contour # Plot contour lines
set key outside
set cntrparam cubicspline # Smooth out the lines
set cntrparam levels discrete 3.197,3.552 # Plot the selected contours
unset colorbox
set cbrange [0:7000] # Set the color range of contour values.
set palette model RGB defined ( 0 'white', 1 'black' )
set style line 1 lc rgb '#4169E1' pt 7 ps 2
splot 'Contours.txt' using 1:2:3 with pm3d notitle,\
'M_Coord_Plain.txt' using 1:2:(0) with points ls 1 notitle
结果图是。如何在Gnuplot 5.4.1中重现此示例我得到警告:无法等高线非网格数据。请使用“设置dgrid3d”。