GNUPLOT contour over splot with pm3d from different data files

回眸只為那壹抹淺笑 提交于 2021-02-11 07:53:11

问题


i am struggling in trying to splot a nonuniform binary matrix from a datafile1, and plot over it a contour of another variable, over the same grid but another datafile. Both the datafiles are in binary matrix shape.

    # 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

basically i have been trying to follow some recipes fished along the internet. If I try to plot only the splot, i obtain a 2D pic. I want to put on it isolines from the 'contour_variable_field_binary' file, so i splot it on a table file and i splot it together with the field to be plotted. I do it, i obtain a black pic. How can i superimpose isolines from another file? Any clues?


回答1:


Since my suggestion is a bit too long for a comment:

Have you tried plotting both original files together? You can disable contouring of the first file using nocontour, and disable the surface for the second plot with 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

Can't tell if this works properly because I have not data for testing.



来源:https://stackoverflow.com/questions/30525002/gnuplot-contour-over-splot-with-pm3d-from-different-data-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!