Plot and append
paperlovestory
make/o/n = (num_rows) y_1D
setscale/p x, min, max, "x", y_1D
Display y_1D
for (aa = 0; aa < num_cols; aa += 1)
y_1D[] = y_2D[p][aa]
appendtograph y_1D
endfor
setscale/p x, min, max, "x", y_1D
Display y_1D
for (aa = 0; aa < num_cols; aa += 1)
y_1D[] = y_2D[p][aa]
appendtograph y_1D
endfor
I am pretty sure it is something to do with the way the loop is written, but cannot quite figure out how this should be done?
June 23, 2017 at 02:24 am - Permalink
wave w // contains traces to be plotted in columns
variable i
variable nCols = DimSize(w,1)
Display
for (i=0; i<nCols; i+=1)
appendtograph w[][i]
endfor
end
June 23, 2017 at 02:28 am - Permalink
That works - thank you so much!!!
If it isn't too complicated/too much of a trouble, do you mind explaining why my code above is illogical/doesn't work, please?
June 23, 2017 at 02:32 am - Permalink
y_1D[] = y_2D[p][aa]
appendtograph y_1D
endfor
this overwrites y_1D each time the loop runs. You should end up with num_col traces on the graph which are all on top of each other and have the values of the last column of your 2D wave.
June 23, 2017 at 03:36 am - Permalink