Surprising behaviour of cursor command on an image

My goal is to programmatically place cursors on an image, and I would like to enter x,y coordinates (not point numbers).

With traces this works fine, and I can switch to point numbers with /P, images seem to only accept point numbers. Try my example below:

make /N=(100,100) gau=gauss(x,50,10,y,50,15);make/N=101 wxy=-50+p;display;appendimage gau vs {wxy,wxy} cursor/I a gau 10,10;Showinfo setscale /I x,-10,10,gau;display gau[][50] cursor A gau 4 cursor/P B gau 4 ShowInfo

I would expect cursor A in the image to land in the top right quadrant, yet it lands in the left bottom, right on the point number. Cursors on traces do display the behaviour I expect: no flag: x, with /P on the point.
Any ideas?
The X values being used are the scaled X values from the SetScale commands, not the X values from the axis. Surprising, but documented. Here's the relevant text from the reference documentation for the Cursor operation:

Quote:
x_value is an X value in terms of the X scaling of the wave displayed bytraceName. If traceName is graphed as an XY pair, then x_value is not the same as the X axis coordinate. Since the X scaling is ignored when displaying an XY pair in a graph, we recommend you use the /P flag and use a point number for x_value.


Between the Cursor command you used on the image and the Cursor commands you used on the XY graph, you changed the X scaling of the matrix wave gau. Also, the XY trace uses a waveform (no X wave) but the image uses X and Y waves to set the X and Y axes of the image. So you've combined a bunch of things that made your test a confusing test of a confusing property of the Cursor command :)

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Ah, thank you. It didn't come to mind that x-scaling and using and x-wave would be functionally different, but now I see it is the case. Thanks for the explanation.