Plotting of complex wave vs real x-value wave
Mon, 11/23/2020 - 10:47 am
I find the plotting of complex wave vs real x-value wave to be nonintuitive.
If the trace is in a non-complex (e.g. real only) mode, the entire wave is displayed.
If the trace is in complex (real & imaginary) mode, only the first half of the wave is displayed.
This is especially confusing to the unaware user as the default setting is to plot complex waves in complex (real & imaginary) trace mode.
While it becomes obviously a bit murky for irregularly spaced (or even non-monotonic) x-value waves, I would suggest that for the complex trace mode, the real value is plotted against the corresponding x-wave value and the imaginary value is e.g. plotted with a small fixed x offset relative to the real value.
make/o/n=128 datax = 2*pi*p/128
make/o/c/n=128 data = p2rect(cmplx(1,datax[p]))
display data vs datax
appendToGraph/l=l2 data vs datax
ModifyGraph cmplxMode(data)=0, cmplxMode(data#1)=1
Label left "Data (cmplx)"
Label l2 "Data (real)"
Label bottom "Phase (rad)"