![](/profiles/wavemetrics/themes/wavemetrics/logo.png)
Display graphed subset of waves in table
![](/sites/default/files/styles/thumbnail/public/default_images/Artboard%201_1.png?itok=jeHOCIXy)
![](/profiles/wavemetrics/themes/wavemetrics/images/icons/employee-icon.png)
hrodstein
using the axis range to determine the subset. This is a quick attempt at a starting point
for that function. It works for waveform data only, not XY data.
Function DisplayGraphDataInTable(graphName)
String graphName // "" for top graph
GetAxis /W=$graphName /Q bottom
Variable axisLeft = V_min, axisRight = V_max
Variable index = 0
do
Wave/Z w = WaveRefIndexed(graphName, index, 1)
if (!WaveExists(w))
break
endif
// Just for testing.
String name = NameOfWave(w)
Print name
// This assumes that you are displaying waveforms, not XY pairs.
Variable startPoint = x2pnt(w, axisLeft)
Variable endPoint = x2pnt(w, axisRight)
String newName = name + "_p" // _p for "part"
Duplicate /O /R=[startPoint,endPoint] w, $newName
Wave newWave = $newName
if (index == 0)
Edit newWave.id
else
AppendToTable newWave.id
endif
index += 1
while(1)
End
String graphName // "" for top graph
GetAxis /W=$graphName /Q bottom
Variable axisLeft = V_min, axisRight = V_max
Variable index = 0
do
Wave/Z w = WaveRefIndexed(graphName, index, 1)
if (!WaveExists(w))
break
endif
// Just for testing.
String name = NameOfWave(w)
Print name
// This assumes that you are displaying waveforms, not XY pairs.
Variable startPoint = x2pnt(w, axisLeft)
Variable endPoint = x2pnt(w, axisRight)
String newName = name + "_p" // _p for "part"
Duplicate /O /R=[startPoint,endPoint] w, $newName
Wave newWave = $newName
if (index == 0)
Edit newWave.id
else
AppendToTable newWave.id
endif
index += 1
while(1)
End
![](/sites/default/files/forum.png)
Forum
![](/sites/default/files/support.png)
Support
![](/sites/default/files/gallery.png)
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More