scalarToColorMap a scalar to a color using a color map |
|
This information is part of the Modelica Standard Library maintained by the Modelica Association.
//Real T, T_min, T_max, colorMap[:,3]; Colors.scalarToColor(T, T_min, T_max, colorMap);
This function returns an rgb color Real[3] that corresponds to the value of "T". The color is selected from the colorMap by interpolation so that "T_min" corresponds to "colorMap[1,:]" and "T_max" corresponds to "colorMap[end,:]".
| T |
Type: Real Description: Scalar value |
|---|---|
| T_min |
Type: Real Description: T <= T_min is mapped to colorMap[1,:] |
| T_max |
Type: Real Description: T >= T_max is mapped to colorMap[end,:] |
| colorMap |
Type: Real[:,3] Description: Color map |
| color |
Type: Real[3] Description: Color of scalar value T |
|---|