Color from a third wave in Igor Pro
A trace can take its color from data instead of from a constant.
Function ColorByDepth(WAVE y, WAVE depth)
DoWindow/K DepthView
Display/N=DepthView y
ModifyGraph mode=3, marker=19, msize=2.5
ModifyGraph zColor(y)={depth, *, *, Rainbow, 0}
ColorScale/A=RC/E/N=depthScale trace=y, "Depth (m)"
ColorScale/C/N=depthScale fsize=9, width=8
End
How it works
zColor(trace)={wave, low, high, table}colors point by point.*for a limit means autoscale to the color wave's range.- A
ColorScalenext to it is what makes the colors mean something.
Keywords and builtins used here
ColorScaleDisplayDoWindowEndFunctionModifyGraphWAVE
The run, in numbers
- Lines
- 10
- Characters to type
- 274
- Tokens
- 72
- Three-star pace
- 85 tpm
At the three-star pace of 85 tokens a minute, this run takes about 51 seconds.
Step 6 of 6 in Styling, step 11 of 19 in Graphs & presentation.