Plotting xy curve with indexwave

Hi, I have three wave x, y (for 1d plotting) and index wave.

I would like to do 'display y vs x' with line (not scatter).

is there any way to do this without splitting x and y wave?

Thank you for your help!

The way I'm reading your question, display ywave vs xwave and ModifyGraph mode=0 will give a line through your xy coords. So, I guess you mean something else? What do you want to do with the index wave?

Make yWave
SetScale/I x, -5, 5, yWave
yWave = gauss(x,0,1)
Display ywave
ModifyGraph swapXY=1

graph

 

I am not sure if this is what you want, but there is the `swapXY = 1` option in `ModifyGraph`:

    s=0:    Normal orientation of X and Y coordinates.
    s=1:    Swap X and Y values to plot Y coordinates versus the horizontal axes and X coordinates versus the vertical axes. The effect is similar to mirroring the graph about the lower-left to upper-right diagonal.

This will allow you to have only yWave plotted with lines between points and not having to create a separate x wave.

Note that this option is global for all elements in the current graph, so if you want to add another axis with "normal" behavior, you need to put this into a sub-window.

Graph0.png

In reply to by ukos

ukos wrote:
Note that this option is global for all elements in the current graph, so if you want to add another axis with "normal" behavior, you need to put this into a sub-window.

Note that you can do Display/VERT or AppendToGraph/VERT to get the effect of SwapXY applied to a single trace. I can't tell if this actually solves the OP's problem, though.