Unevenly spaced data in 3D surface plot

Hi

I am quite new to Igor, and have a question:

I have a data set containing Y values as a function of X and Z. I wish to make a 3D surfaceplot. The Z values are evenly spaced, but my X are not. The X values are derived by dividing the end value by 2, that is the endvalue is 20, so the next values are 10, 5, 2.5, 1.25 and so on to 0.078125. and then there is a also a zero value.

I have managed to make a 3D surface using Gismo, but then my X are evenly spaced (matrix vawe). I also managed to make an XY pair for one of the Z values, with the X unevenly spaced. I also did a triplet wave and a scatter with surface plot, but here I can not make the X values unevenly spaced either.

Can I somehow make several XY pairs and plot this as a function of Z and make a surface plot? Or how do I solve this problem the best way?

All the best
It is difficult to understand the exact details of your application from the description above. In general, if you have data that are not sampled on a regular rectangular grid it is best to use ImageInterpolate (with the keyword Voronoi) and resample the data in the form of a rectangular array. You can find a video tutorial about this subject here: http://www.wavemetrics.com/products/igorpro/videotutorials.htm (look for "Creating a Surface Plot from Scatter Data").

If you are still not sure how to proceed feel free to send a copy of the data in an IGOR experiment to support@wavemetrics.com and let us know precisely what you wish to display.

A.G.
WaveMetrics, Inc.
Igor wrote:
It is difficult to understand the exact details of your application from the description above. In general, if you have data that are not sampled on a regular rectangular grid it is best to use ImageInterpolate (with the keyword Voronoi) and resample the data in the form of a rectangular array. You can find a video tutorial about this subject here: http://www.wavemetrics.com/products/igorpro/videotutorials.htm (look for "Creating a Surface Plot from Scatter Data").

If you are still not sure how to proceed feel free to send a copy of the data in an IGOR experiment to support@wavemetrics.com and let us know precisely what you wish to display.

A.G.
WaveMetrics, Inc.


Thank you for your reply

I am not sure this helps me though, I have gone trough this tutorial and made this surface plot from scatter data. My main problem, that I have also when making a surface plot from a matrix wave, is that my concentration values should not be evenly spaced, the distance between 20 and 10 should be twice as long as between 5 and 10 and so on.

I wonder if I am asking for the impossible? As I understand it, a wave must have uniformly spaced data, and I need a wave to make a 3D surface plot. To have unevenly spaced data a need to use XY pair, but I can only use this for 1D graphs, not 3D graphs. Is this correct?

I have attached my surface on scatter data as an image. The surface does not cover all the data which probably can be solved, I haven't looked into this. My main problem that I have to solve is the scaling of the concentration axis. Can I somehow use the set scale function to make the scaling like I want it?
scatter surface.jpg
aj11bz wrote:
I wonder if I am asking for the impossible? As I understand it, a wave must have uniformly spaced data, and I need a wave to make a 3D surface plot. To have unevenly spaced data a need to use XY pair, but I can only use this for 1D graphs, not 3D graphs. Is this correct?


No, it is not completely correct. If the source wave for a surface plot is a 2D matrix then, by definition, the intervals between rows or columns are as reflected by wave's scaling. If, on the other hand you start from a completely random distribution of values contained in a triplet wave, i.e., randomly sampled {x,y,z} points, you use ImageInterpolate (as in the video tutorial) to create a 2D wave representing the data sampled on a rectangular grid and covering some rectangular domain. When you plot this 2D wave (with or without the scatter), you would get properly scaled intervals, i.e., the distance between 10 and 20 will be twice that between 5 and 10 as you expect. Gizmo's output scaling is strictly linear.

Quote:
I have attached my surface on scatter data as an image. The surface does not cover all the data which probably can be solved, I haven't looked into this.


To make sure that the surface covers the full range of the data you should pre-scan the input to find out the minimum and maximum values in the X and Y directions. You then use these values in the /S flag of ImageInterpolate.

Quote:
My main problem that I have to solve is the scaling of the concentration axis. Can I somehow use the set scale function to make the scaling like I want it?

I am not sure what you want to do here. It is difficult to tell from the jpg image what is going on; the tickmarks and labels on the axis appear equally spaced. Do you want them to reflect different values other than the range [0,20]? Note that if you applied SetScale to the matrix wave produced by ImageInterpolate, you would be able to shift and scale the surface but it would not match the scatter data from which you created the graph. If you intend to display both the scatter and the surface as in the image, you should consider scaling the input triplet as necessary because the subsequent ImageInterpolate computes the appropriate scaling for the interpolated image.

It would be far more efficient if you sent a copy of this experiment to support@wavemetrics.com and tell us exactly how you want the axis scaled.

A.G.
WaveMetrics, Inc.