Creating an Image Plot from a scattered data set
Pranab
X = 1; YZ = (1, 100), (2, 104), (3, 117), ...., (10, 87)
X = 2; YZ = (-1, 201), (1.5, 159), ..., (10.5, 198)
...
X = 10; YZ = (-5.2, 103), (-2.3, 205), ..., (12, 147)
Now I want to combine all the data into a single image plot, all the YZ data set contain the same number of data points, but the Y_values are different for different data set, and they are not equally spaced.
Is there a way to plot this data as it is? Otherwise, I guess I need to interpolate all the data for the same range of Y_values. Thanks!!!
(1) convert each of your YZ waves to triplet form by pre-pending its common X value in dimension 0. If you have named these YZ waves in a simple sequential manner, it is easy to program this.
(2) concatenate each of these small triplet waves into one long triplet wave using the Concatenate operation. Example:
for 'wtrip' refreshed within a loop; otherwise list all small triplet waves.
See the Concatenate help file for further details.
Then create your image using the ImageInterpolate operation with the total triplet input wave, as in
The default image wave is created in M_InterpolatedImage. See the ImageInterpolate help file for further details.
Another option is to display the triplet data in a Gizmo scatter plot.
December 14, 2012 at 09:52 am - Permalink
1 1 100
1 2 104
1 3 117
...
Now you can plot the points as scatter with color as f(z), e.g.,
Display yWave vs xWave
ModifyGraph mode=3,marker=19
ModifyGraph zColor(yWave)={zWave,*,*,Rainbow,0}
Another alternative is that you store the data in a triplet wave (a 3-column wave that contains the same data as above) and then you can display the data in a 3D scatter using Gizmo. You can find an example of this in http://www.wavemetrics.com/products/igorpro/videotutorials.htm under "Creating a Surface Plot from Scatter Data".
I hope this helps,
A.G.
WaveMetrics, Inc.
December 14, 2012 at 09:56 am - Permalink
December 14, 2012 at 09:59 am - Permalink
December 15, 2012 at 03:17 am - Permalink
Which version of Igor are you using? I don't get that option with Igor Pro 6.1.
December 15, 2012 at 09:25 am - Permalink
In Igor Pro 6.1 you can get the same functionality by opening the procedure window (Windows->Procedure Windows->Procedure Window) and entering this:
Then close the procedure window.
Alternatively you can update to Igor Pro 6.22A or 6.30B01 (the current beta) by choosing Help->Updates for Igor. I recommend updating to 6.30B01 if not now then when you have a spare moment.
December 15, 2012 at 10:03 am - Permalink