Reputation: 3199
I am trying to plot two overlaying graphs.
The first is a simple x-y points plot:
plot myfile u 1:2
The second is a contour plot at level 0, which I can plot with the following commands:
set contour
unset surface
set view map
set cntrparam levels discrete 0
splot a0 + a1*x + a2*y + a3*x**2 + a4*x*y + a5*y**2 + a6*x**3 + a7*x**2*y + a8*x*y**2 + a9*y**3
a0
-a9
are constants
Both use the same xrange and yrange.
How can I plot them both in the same graph?
Upvotes: 2
Views: 8175
Reputation: 310307
This is a somewhat tricky one. You can write the contours to a file using
untested
set table 'datafile'
set contour
#contour options
splot ... with contours
unset table
Then you can plot that data with lines:
set term ...
set output ...
set view map
splot myfile u 1:2:(0.0), 'datafile' u 1:2:3 w lines
Upvotes: 3