I’ve made a 3d surface plot in gnuplot, and I’m wondering if it’s possible to plot an unrelated 2d line graph on the ‘wall’ of the y,z axis.
So in essence, I take my x,y line plot but paste it on to the y,z axis.
Similar to a contour plot on the x,y, under a 3d surface, but different.
This may not be precisely what you are looking for, but it is a way to plot a function on a ‘wall’ of your splot box:
Here is the result:
What the script does is plots the function you want to plot on the wall (myfun(x,y)) and does a splot of it, restricted to values that are very close to the wall. The surface mesh has a certain number of gridpoints, and one of those points is always at the x and y limits.
In this example, if I had just done
splot sin(x), y**2, I would have gotten two overlapping surfaces.I made four functions (
xminwall, etc.) so you can plot on the wall at the x/y range minimum/maximum walls. Note thatmufun(x,y)has to be a function of the correct x and y in order for the plot to show up properly on the wall, otherwise you might get a straight line.