Skip to main content

CsrXWaveRef

CsrXWaveRef (cursorName [, graphNameStr])​

The CsrXWaveRef function returns a wave reference to the wave supplying the X coordinates for an XY plot of the Y wave the specified cursor (A through J) is attached to in the top (or named) graph.

Details​

The wave reference can be used anywhere Igor is expecting the name of a wave (not a string containing the name of a wave).

CsrXWaveRef returns a null reference (see WaveExists) if the wave the cursor is on is not plotted versus another wave providing the X coordinates (that is, if the wave was not plotted with a command such as Display theWave vs anotherWave). CsrXWaveRef should be used in place of the CsrXWave() string function in order to work properly with data folders.

Examples​

Display ywave vs xwave

ywave supplies the Y coordinates and xwave supplies the X coordinates for this XY plot.

Cursor A ywave,0
Print CsrXWaveRef(A)[50] // prints value of xwave at point #50

See Also​

Programming With Cursors, Wave Reference Functions