3

您所在的位置:网站首页 scatter3怎么在点下标注名字 3

3

2024-05-06 13:30| 来源: 网络整理| 查看: 265

Assign different colors to each point using a colormap.

Specify a row or column vector of numbers. The numbers map into the current colormap array. The smallest value maps to the first row in the colormap, and the largest value maps to the last row. The intermediate values map linearly to the intermediate rows.

If your plot has three points, specify a column vector to ensure the values are interpreted as colormap indices.

You can use this method only when X, Y, and Z are vectors, and S is either a vector or a scalar.

Create a vector C that specifies four colormap indices. Plot four points using the colors from the current colormap. Then, change the colormap to winter.

C = [1 2 3 4]; X = [1 2 3 4]; Y = [1 0 6 2]; Z = [2 5 3 7]; S = 50; scatter3(X,Y,Z,S,C) colormap(gca,"winter")


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3