Q:

Plotting curves in y=0 plane of a 3D plot in gnuplot

I am plotting a 3D graph of a 2D distribution z(x, y) using the code, 
----- (variables and functions definition) -------
set ticslevel 0
set pm3d
set zrange[cbmin:cbmax]
set xrange[0:261]
set yrange[0:261]
set xtics 50
set ytics 50 
set ztics 2

splot fnc_snap_name(idx, PSNAP, fname_snap) using 1:2:($4>0?f($4):cbmin) \
    with pm3d notitle, fnc_snap_name(idx, PSNAP_INT, fname_snap_int) using \
       1:0:($3>0?f($3):cbmin) with line ls 1 lw 3 notitle

pause -1 

Further, on the same code and with the second argument of the splot command, I am trying to plot on the plane y=0 a 1D distribution. The result is the following 

As you can see, the the curve appears in the diagonal while I was thinking that writing 1:0:X will fix the y-coordinates to be zero, the column data 1 for the x-coordinates and X will be the z-coordinates.
What is the right way to proceed?

A:

Very close.  Rather than using 1:0:(x) you want 
splot ... using 1: (0.0) : ($3>0?f($3):cbmin)

That is, you want the constant value (0.0) not the value of data column 0, which is a "pseudo-column" representing the line number of a data file or sequential index of a data structure.

