Never mind, I figured it out; Matlab was just making a big string instead of an array of strings, so I had to change it to a cell array.
Info
This question is closed. Reopen it to edit or answer.
Color and marker type not correct
1 view (last 30 days)
Show older comments
Why on Earth would the following code produce the attached figure (the figure I attached is the second one; the first has the same incorrect colors and marker shapes)??
point_types = ['rd', 'y^', 'gs', 'bo', 'kv'];
figure
hold on
for i = 1:5
scatter(all_data(yy_idx == i, 1), all_data(yy_idx == i, 2),...
point_types(i), 'filled');
end
hold off
figure
hold on
for i = 1:5
scatter(all_data(km_idx == i, 1), all_data(km_idx == i, 2),...
point_types(i), 'filled');
end
hold off
1 Comment
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!