问题
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