How can you change the colour of the plot when using scatter function?

1 回表示 (過去 30 日間)
David Dijemeni
David Dijemeni 2012 年 3 月 23 日
How can you change the colour of the plot when using scatter function? I have used all the predefined colours already.

回答 (1 件)

Honglei Chen
Honglei Chen 2012 年 3 月 23 日
The syntax of
scatter(x,y,s,c)
supports c being a 3-ciolumn matrix where each row is a combination of RGB values, e.g.
x = 1:10;
y = 1:10;
scatter(x,y,[],rand(10,3));
see
doc scatter

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by