更改 scatter3 中标记的大小
Change size of markers in scatter3
我想画一组不同颜色的点。
不幸的是,这些点变得非常小。我该如何更改?
这是我的代码现在的样子,但它不起作用
% Draw with different colors
colors = ['b'; 'k'; 'r'; 'g'; 'm'; 'y'; 'c']
hold on;
for i = 1:7
x = cell2mat(cluster_l(i))
scatter3(x(:,1),x(:,2),x(:,3), strcat(colors(i), '.'), 'MarkerSize', 12);
end
但显然在 Scatter class 上没有 MarkerSize 属性。
您可以将标记的大小指定为 fourth argument (S
):
scatter3(x(:,1), x(:,2), x(:,3), 12, strcat(colors(i), '.'));
draws each circle with the size specified by S. To plot each circle
with equal size, specify S as a scalar. To plot each circle with a
specific size, specify S as a vector.
我想画一组不同颜色的点。
不幸的是,这些点变得非常小。我该如何更改?
这是我的代码现在的样子,但它不起作用
% Draw with different colors
colors = ['b'; 'k'; 'r'; 'g'; 'm'; 'y'; 'c']
hold on;
for i = 1:7
x = cell2mat(cluster_l(i))
scatter3(x(:,1),x(:,2),x(:,3), strcat(colors(i), '.'), 'MarkerSize', 12);
end
但显然在 Scatter class 上没有 MarkerSize 属性。
您可以将标记的大小指定为 fourth argument (S
):
scatter3(x(:,1), x(:,2), x(:,3), 12, strcat(colors(i), '.'));
draws each circle with the size specified by S. To plot each circle with equal size, specify S as a scalar. To plot each circle with a specific size, specify S as a vector.