XYZSetFillColors¶
XYZSetFillColors sets the fill color for areas between isolines (i.e. to the color grade of the 3D surface).
-
bool = XYZSetFillColors(hData, rmRGB)
Return Value
If the function succeeds, the return value bool is TRUE (1); otherwise it is FALSE (0).
Parameters
-
hData
The handle of a dataset created with XYZCreate.
-
rmRGB
rmRGB is a matrix with 3 columns. The number of rows is equal to the number of isoline values in the xyz-dataset.
Value Meaning Column 1 Red (0 to 255) Column 2 Green (0 to 255) Column 3 Blue (0 to 255) The matrix can have a maximum of 100 rows. “i” is the index of the corresponding isoline value. The index begins with 1.
Comment
The changes are set when the XYZUpdate function was executed.
Example
def test_XYZSetFillColors()
{
hDoc = DocCreate();
hPage = PageCreate();
DocAddPage(hDoc, hPage);
hLayer = LayerCreate();
PageAddLayer(hPage, hLayer)
x = linspace(-10, 6.0, 30);
y = linspace(-10, 5.0, 30);
<xx, yy> = meshdom(x,y);
zz = sin(sqrt(xx.*xx + yy.*yy)) + sin(xx);
rvRange = [x[1], y[1], x[len(x)], y[len(y)]];
hData = XYZCreateFromMatrix("sin", zz, rvRange);
LayerAddDataset(hLayer, hData);
LayerAutoScale(hLayer);
XYZDeleteIsoValues(hData);
rvIso = [-2:0.4:2];
XYZAddIsoValues(hData, rvIso);
rmColor = _InterpolateColors([0,0,255], [255,0,0], len(rvIso));
XYZSetFillMinColor(hData, [0,0,255]);
XYZSetFillColors(hData, rmColor);
XYZSetFill(hData, TRUE);
XYZUpdate(hData);
PageReplot(hPage);
}
See also
Overview XYZ-Datasets, XYZCreate, XYZSetFillMinColor, XYZGetFillColors, XYZGetFillMinColor, XYZGetIsoValues, XYZSetFill
id-1671761