3D figure can be made using Igor Pro (Wavemetrics, Inc.) which is a well-known data analysis software.
The procedure to make a 3D plot is the following two steps
a. Menu "Windows" ->New- >3D plot
b. Menu "Gizmo"-> Append surface (or something else such as Scatter,)
There are various data formats to be plotted as the "surface" in the 3D plot. In my case, I mostly use the "matrix" format in which z values sit in a xy 2D matrix.
You can colorize the surface using a fixed color or built-in color tables. To give a special color to the 3D surface other than the fixed colors or the built-in color tables, you need to make your own color wave against the data. If the dimension of the original 2D matrix data is m x n, then the dimension of the color wave should be m x n x 4. (If you don't want to specify the transparency level, the color wave dimension can be m x n x 3.)
Let CW(i, j, k) the color wave. The row i and column j corresponds to the row and column of the original 2D wave. The layer k corresponds to the r, g, b and t components of the RGB color. For example, a RGB color (r, g. b) for a pixel at (a, b) in the original 2D matrix data is stored in the color wave CW(i, j, k) as CW(a, b, 0) = r, CW(a, b, 1) = g, CW(a, b, 2) = b . Additionally, the transparency factor alpha is stored at CW(a, b, 3) as CW(a, b, 3) = alpha. The color wave should be made for each data and for each color scale.
To make a line in 3D plot, you need to call xyz data as a path through "Append path". XYZ data is a n x 3 2D matrix. Each row composed of 3 columns represents a (x, y, z) address of a data point.
To make a 3D surface from a curve (such as a band bending profile) by an operation close to "extrude" in the adobe illustrator, you need to make a matrix with dimensions of n x 2, where n is a length of the data wave.
If the x values are separated by a constant value, you only need to make a n x 2 matrix and paste the data value to the first and second columns, and scale the x and y indices.
If the x values are not regularly separated and stored in a 1D wave, you need to make new x, y, and z 1D waves at first and convert them to a 2D matrix using "XYZ wave to matrix" macro provided by Wavemetrics . The procedure is as follows.
Suppose you have x wave and z (data value) wave of n points at the beginning. Make x1, y1, and z1 1D waves having 2n points. Paste x and z(data) values to 0th to (n-1)th rows of the x1 and z1 waves and again nth to (2n-1)th rows of the x1 and z1 waves. Input a single value such as "0" in the 0th to (n-1)th rows of the y1 wave and input a different value such as "1" in the nth to (2n-1)th rows of the y1 wave. Click Data->package->XYZ to matrics, and select Macro->XYZ wave to matrix. Specify X1, Y1, and Z1 waves and convert them to matrix.
In the example below, you are supposed to have a "original_x_wave" of 100 points as the x wave and "original_data_wave" of 100 points as the data wave.
make/N=(200)/D x1, y1, z1
x1[0,99] = original_x_wave
x1[100,199] = original_x_wave[p-100]
z1[0,99] = original_data_wave
z1[100,199] = original_data_wave[p-100]
y1[0,99]= 0
y1[100, 199] =1
XYZtoMatrixEx("x1",100,"y1",2,"z1","xyzsurface",NaN,1e-05,2,2)