color (var Value, int color1, int color2, int color3, int color4) : int

Returns the color corresponding to a position within a range of up to 4 colors; used for plotting heatmaps or multiple curves.

Parameters:

Value The color position within the range in percent; from 0 for color1 until 100 for color4.
color1..color4 The color range, starting with color1 and ending with color4. For 2-color or 3-color ranges, color3 and color4 can be omitted. See Colors for the color format.

Returns

Color within the range.

Remarks:

Example:

for(i=0; i<N; i++)
for(j=0; j<N; j++)
plotGraph("Heatmap",j+1,-i-1,SQUARE,color(Correlations[i][j]*100,BLUE,RED));

See also:

plot, Colors

► latest version online