Question

I have two whitespace separated files that each partially contain the 4D data I need to plot. Call the data points (x,y,z,w). x, y are in both files, but the z and w are split up. I'm not sure how to pull the data properly, and define the proper palette.
I would normally use:

splot "Data1.dat" using 1:2:3 \
      "Data2.dat" using 1:2:3

If I were trying to simultaneously plot 2 surfaces. But I'm trying to plot a 4D surface, where the dimension data is split between files.

Ideally, I'd use the HSV color mode, with a fixed saturation, where H is a function of Z, and V is a function of W. I don't understand the palette functions documentation, where each R,G,B is a function of the variable "Gray".

Was it helpful?

Solution

The simplest solution I can think of, would be to make use of the possibility to use command-line tools in gnuplot, something like

splot "<paste Data{1,2}.dat" using 1:2:3:6

should do the trick.

Note: The ordering of x and y should match!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top