This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

FillColorDirection, FillColorDirectionX, FillColorDirectionY, FillColorDirectionZ

Direction of color transitions on surfaces

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Value Summary

FillColorDirectionLibrary wrapper for “[FillColorDirectionX, FillColorDirectionY]” (2D), “[FillColorDirectionX, FillColorDirectionY, FillColorDirectionZ]” (3D)See below
FillColorDirectionX, FillColorDirectionY, FillColorDirectionZInheritedReal number


FillColorDirection determines the direction in which the color transitions for FillColorType = Dichromatic etc. take place.

When setting FillColorType to some other value than Flat or Functional, MuPAD® produces a “height-coloring.” By default, this color method actually uses the height of a point. Using FillColorDirection, the axis along which the color method should be applied can be changed.


Example 1

By default, MuPAD uses height coloring along the z axis for 3D objects:

s := plot::Spherical([sin(r),thet/(r+1)+1, thet*r], 
                     r=0..1, thet=0..3*PI, Submesh=[2,2]):

By changing FillColorDirection, the color can be rotated on the object:

plot(s, FillColorDirection = [0, 1, 0])

Was this topic helpful?