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
この質問は閉じられています。 編集または回答するには再度開いてください。
Color and marker type not correct
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!