PointColorType

Point coloring types

MuPAD® notebooks will be removed in a future release. 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

OptionalDichromatic, or Flat

Graphics Primitives

ObjectsPointColorType Default Values
plot::SparseMatrixplotFlat

Description

PointColorType controls the type of point coloring used in objects of type plot::SparseMatrixplot.

With PointColorType = Flat, all points in a plot::SparseMatrixplot object are displayed in the color given by PointColor.

With PointColorType = Dichromatic, the points are colored differently using a color blend from the color PointColor to the color PointColor2. The actual color of a point indicates the size of the matrix entry visualized by plot::SparseMatrixplot.

Examples

Example 1

We create a 30×50 matrix with 500 random entries. With the default setting of PointColorType = Flat, all nonzero entries are displayed in the color given by PointColor:

smp := plot::SparseMatrixplot(
              matrix::random(30, 50, 500, frandom)):
plot(smp):

We change the color type to Dichromatic and request a dark green for large matrix entries and a light green for small matrix entries:

smp::PointColorType := Dichromatic:
smp::PointColor := RGB::LightGreen:
smp::PointColor2 := RGB::DarkGreen:
smp::PointStyle := FilledDiamonds:
smp::PointSize := 2.5*unit::mm:
plot(smp):

delete smp:

See Also

MuPAD Functions