Wrong color of scatter points

2 ビュー (過去 30 日間)
Norman Sterzel
Norman Sterzel 2016 年 1 月 4 日
コメント済み: Norman Sterzel 2016 年 1 月 4 日
Hi,
i'm trying to scatter some points using the scatter functions. I set two conditions: the '.' and that the color should be blue with 'MarkerFaceColor','b' The problem is, that all the dots are getting different color.
Example Code:
hold off
x = rand(3,5);
y = rand(3,5);
for m = 1:length(x(1,:))
for n = 1:length(y(:,1))
scatter(x(n,m),y(n,m),'.','MarkerFaceColor','b');
hold on
end
end
Why is that? Im using Matlab R2015a Thank You

採用された回答

Ilham Hardy
Ilham Hardy 2016 年 1 月 4 日
hold off
x = rand(3,5);
y = rand(3,5);
for m = 1:length(x(1,:))
for n = 1:length(y(:,1))
%scatter(x(n,m),y(n,m),'.','MarkerFaceColor','b');
scatter(x(n,m),y(n,m),'.b');
hold on
end
end
  1 件のコメント
Norman Sterzel
Norman Sterzel 2016 年 1 月 4 日
Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeScatter Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by