.. highlightlang:: us .. index:: XYZSetFillColors .. _xyzsetfillcolors: XYZSetFillColors ================ .. us.tag XYZSetFillColors ENGLISH XYZSet_iso Changed412 :ref:`XYZSetFillColors` sets the fill color for areas between isolines (i.e. to the color grade of the 3D surface). .. function:: bool = XYZSetFillColors(hData, rmRGB) .. us.return **Return Value** If the function succeeds, the return value *bool* is TRUE (1); otherwise it is FALSE (0). .. us.params **Parameters** .. uparam:: hData The handle of a dataset created with :ref:`XYZCreate`. .. uparam:: rmRGB *rmRGB* is a matrix with 3 columns. The number of rows is equal to the number of isoline values in the xyz-dataset. .. list-table:: :header-rows: 1 * - 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. .. us.comment **Comment** The changes are set when the :ref:`XYZUpdate` function was executed. .. us.example **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); = 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); } .. seealso:: :ref:`overview-xyz-datasets`, :ref:`XYZCreate`, :ref:`XYZSetFillMinColor`, :ref:`XYZGetFillColors`, :ref:`XYZGetFillMinColor`, :ref:`XYZGetIsoValues`, :ref:`XYZSetFill` :sub:`id-1671761`