Set trace colors from index wave
Thu, 02/01/2024 - 07:49 am
A user interface for assigning trace colors from a color table based on some numeric quantity that varies between traces.
The "Make Traces Different" package can color traces so that colors are equally spaced* between the limits of a color table. But if you want to take index values from a wave, or to manually define color index values that do not vary systematically, this snippet may help.
* note that "Make Traces Different" selects the row number of a color table wave using round() rather than floor(). For high-resolution color tables the results are similar, but for color tables with visible steps we should use floor() to ensure that colors are indexed quantitatively to a color scale.
Edit: see the 'Color Traces by Index' project for current version of this code.
Igor Pro 9
Igor XOP Toolkit
Igor NIDAQ Tools MX