Visualizing Surface Plot vs time
maplemann
I have the following data structure: x_wave, y_wave, Intensity, time. The time wave contains integers.
It is no problem for me to plot a Surface Plot x,y vs Int for each time point. I wonder if it is possible to include something like a slide bar, so that I can visualize the Suface Plots over time.
I found examples of exactly what I need in the 3D Gallery, i.e.:
http://www.wavemetrics.com/products/igorpro/gallery/3dsamps_Madler.htm
http://www.wavemetrics.com/products/igorpro/gallery/3dsamps_tominaga.htm
Unfortunately I have no idea how create this kind of visualization.
Cheers,
Georgi
- I'm assuming that the x and y values are identical for all times t.
- Copy one of your intensity waves. Call it 'W_CurrentIntensity' or anything you like.
- Display this copy in a gizmo plot, similar what you're doing now.
- Now try to assign the intensities of different timepoints to the W_CurrentIntensity. For example
W_CurrentIntensity = W_TimePoint1
See how the Gizmo plot automatically updates to show each timepoint?
This is what you can use to set up this visualization. Briefly:
- Create a new panel (Windows -> New -> Panel).
- Press control-T or command-T to show the tools.
- Add a slider (panel -> add controls -> slider).
- Set the slider limits from 0 to the number of timepoints - 1.
- Create a new procedure for the slider that will set W_CurrentIntensity to the intensities at the current slider value. For example, if slider value = 0 then set W_CurrentIntensity to the values for the first timepoint. If you want to have a slider with live feedback then be sure to add a
DoUpdate
statement to the end of the procedure.If you run into trouble then just let us know at which point you're stuck.
April 14, 2013 at 10:24 am - Permalink
I do something very similar but for extracting 1D traces from a contour plot. In my case, i have a destination wave which is updated with the column values of a 2D wave based on the slider position.
You'll need to initialize the slider's max, min and step values based on your time values. Essentially your slider procedure would need to do the following ( if using ImageInterpolate):
- Assess the new Z wave based on the slider control
- REMOVE the current surface from the gizmo plot (speeds up computation time). When skipping this step, I've encountered an occasional glitch where the new surface isn't displayed correctly.
- Compute new surface using ImageInterpolate (if you need to. I usually have so few data points they don't look like a nice surface)
- Append the new interpolated suface to the Gizmo Plot.
April 15, 2013 at 04:58 am - Permalink