2

I want to draw a set of points each with different colors.

Unfortunately the dots become really small. How can I change that?

This is how my code looks right now, but it is not working

% 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

But apparantly there is no MarkerSize property on the Scatter class.

Natjo
  • 2,005
  • 29
  • 75

1 Answers1

3

You can specify the size of the marker as 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.

m7913d
  • 10,244
  • 7
  • 28
  • 56