2
votes

When plotting a plane that is not parallel to the z-axis, one can simply solve the equation with respect to z and plot it as a function of x and y using splot. When plotting the plane x+y+z=1 for example one can just use z(x, y)=1-x-y and then splot z(x, y).

But how can I plot the plane x+y=1 in gnuplot when there is no function z(x, y) that describes it?

1

1 Answers

2
votes

Use the parametric mode to plot such a plane:

set parametric
splot 2 - u, u, v w l

enter image description here

For the records, here's the full code to generate the above plot:

set ticslevel 0
set xzeroaxis
set yzeroaxis
set xlabel 'x'
set ylabel 'y'
set zlabel 'z'
set autoscale fix
set parametric
splot 2 - u, u, v w l