There are two solutions that I can think of -- but they both involve a decent amount of work on your part. You basically need to put each line into a text file. There are two ways to do it -- The first way you put each line-segement on a line in the datafile and plot with arrows:
#datafile -- Each row represents a line.
x11 y11 x12 y12
x21 y21 x22 y22
...
Then you plot it with:
set style arrow 1 nohead
plot 'datafile' u 1:2:($3-$1):($4-$2) w vec
The second way you put each point by itself, seperating groups of points by a blank:
#datafile -- each row represents a point
x11 y11
x12 y12
x21 y21
x22 y22
...
Then you plot this one with:
plot 'datafile' u 1:2 w l
Beating your data into this form shouldn't be too difficult -- Just traverse each branch until you reach a leaf and write out the 4 lines associated with that leaf. Some of the lines (or portions thereof) will be duplicated, but that probably won't be too much of an issue...
EDIT
I didn't realize you need to plot a 2d function on top. In this case, we're going to need to use splot
to plot the data:
set term push #save terminal info
set term unknown
set contour
set cntrparam ... #whatever you need to make your contours appear the way you want
set table "junk_temporary_file.dat"
splot f(x,y) #whatever function you choose goes here.
unset table
unset contour
set term pop #restore terminal info
set view map
splot 'datafile' u 1:2:(0.0) w l,\
'junk_temporary_file.dat' u 1:2:3 w l #optional line specs here.
If you want colors, it's a little (lot) easier:
set view map
splot f(x,y) w pm3d,\
'datafile' u 1:2:(0.0) w l