plot with different symbols

7 ビュー (過去 30 日間)
Niki
Niki 2014 年 10 月 13 日
編集済み: Stephen23 2014 年 10 月 13 日
I have two vectors with 1000 length each. for example
r1 = rand(1000,1); r2 = rand(1000,1); then I want to plot a scatter which shows r1 versus r2 as follows:
plot(r1, r2) I want to show each two values of r1 and 2 with the same symbol but different from the rest. any suggestion ?
  1 件のコメント
Stephen23
Stephen23 2014 年 10 月 13 日
編集済み: Stephen23 2014 年 10 月 13 日
MATLAB has thirteen different plot symbols. How do you wish to divide up 1000 points?

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

回答 (1 件)

Iain
Iain 2014 年 10 月 13 日
r1 = rand(1,1000);
r2 = rand(1,1000);
plot(1:1000,r1,'bx',1:1000,r2,'kx')
Change the x to +, d, s, o for other symbols....
  1 件のコメント
Niki
Niki 2014 年 10 月 13 日
Thanks for your comment. But not really if I wanted to do such time consuming way to plot, it was much easier to do it in other ways. I am more thinking to find a more automatic way

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

カテゴリ

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