Draw boundary on colormap in Gnuplot using second data file
<p>I have an ASCII data file (density.dat) in the format (x y D), where D represents a density-value at the point (x,y), from which I create a colormap:</p>

<pre><code>   set pm3d interpolate 2,2 corners2color mean
   set view map
   splot data_file u (1e9*$1):(1e9*$2):3 with pm3d
</code></pre>

<p>I have a second data file (potential.dat) with the same format (x y P), where P represents a potential value which can only have one of two values zero or 1.0 (say). I would like to indicate the boundary between the (three) regions (a straight line with slight perturbations) where the potential is zero and the regions where it is non-zero and overlay it on the first colormap of the density.</p>

<p>I though the approach where I plot the contours from one file on the plot of another file (similar to <a href="http://gnuplot-tricks.blogspot.co.at/search?q=contour" rel="nofollow">here</a>), could work but the exported data using the 'set table filename' cannot be used for 'plot filename with image' it seems.</p>

<p>I would greatly appreciate ideas (or solutions..) to tackle this problem.</p>

<p>======== EDIT ==========
Working solution for me:</p>

<pre><code>    set contour base
    set cntrparam level discrete 1.0

    splot density_file u 1:2:3 with pm3d nocontour,\
          potential_file u 1:2:3 w l nosurface
</code></pre>