List of colors to use
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.
For colors in MATLAB®, see
|Optional||List of colors|
|Objects||Colors Default Values|
Colors sets a list of colors to use for object
The length of the list in
Colors need not
be fixed, it just must not be empty. If the list contains more colors
than needed, the remaining colors are simply not used; if the list
contains fewer colors than needed, it will be used cyclically, i.e.,
as if it were repeated as often as necessary. Cf. Example 2.
Most of the statistical plots use
the colors of their groups:
plot(plot::Bars2d([[frandom() $i=1..2] $ i = 1..3]))
plot(plot::Bars2d([[frandom() $i=1..2] $ i = 1..3], Colors = [RGB::Orange, RGB::Yellow, RGB::Magenta]))
If more colors are required than given in
the given list is used cyclically:
plot(plot::Piechart2d([1, 1, 1, 1], Colors = [RGB::White, RGB::Blue]))