GNUPLOT contour over splot 使用来自不同数据文件的 pm3d

GNUPLOT contour over splot with pm3d from different data files

我正在努力尝试从数据文件 1 中绘制一个非均匀二进制矩阵,并在其上绘制另一个变量的轮廓,在同一网格但另一个数据文件上。两个数据文件都是二进制矩阵形状。

    # CONTOUR SETTINGS
    set contour surface
    set cntrparam level discrete 0.3,0.067
    # PRINT CONTOUR ON TABLE
    set table 'tablefile_contour'
    splot 'contour_variable_field_binary' binary with l lt -1
    unset table
    # FIELD SPLOT
    set view map;
    splot 'field_to_be_plotted_2D_binary' binary with pm3d,\
          'tablefile_contour' u 1:2:3 w p lt -1

基本上我一直在尝试遵循在互联网上找到的一些食谱。 如果我尝试只绘制斑点,我会得到一张 2D 图片。我想把 'contour_variable_field_binary' 文件中的等值线放在上面,所以我将它绘制在 table 文件上,然后将它与要绘制的字段一起绘制。我这样做了,我得到了一张黑色照片。 我怎样才能从另一个文件叠加等值线?有什么线索吗?

由于我的建议有点长,无法评论:

您是否尝试过将两个原始文件绘制在一起?您可以使用 nocontour 禁用第一个文件的等高线,并使用 nosurface:

禁用第二个绘图的曲面
set contour base
set cntrparam level discrete 0.3,0.067

set pm3d map
splot 'field_to_be_plotted_2D_binary' binary with pm3d nocontour,\
      'contour_variable_field_binary' binary with l lt nosurface

无法判断这是否正常工作,因为我没有测试数据。