フィルターのクリア

How to have multiple scatter plots on one graph?

15 ビュー (過去 30 日間)
Joshua
Joshua 2014 年 9 月 8 日
コメント済み: Joshua 2014 年 9 月 8 日
Hi,
I am trying to create a scatter graph which includes multiple sets of data. Essentially what I need is very similar to the excel barchart attached except instead of a bar which is just showing an averaged value I would like to plot multiple points.
I have tried using:
scatter(x,y); hold on; scatter(x1,y1) etc...
but can't seem to find any way to subdivide the data into the four subcategories and plot them side by side.

採用された回答

Iain
Iain 2014 年 9 月 8 日
Isn't this what you actually want?
x = 1:7;
y = rand(7,7);
bar(x,y)
  3 件のコメント
Iain
Iain 2014 年 9 月 8 日
Ok, now I get it.
plot(x-0.25,y,'x')
hold on
plot(x1,y1,'o')
plot(x2+0.25,y1,'d')
etc.
That'll do something similar.
Joshua
Joshua 2014 年 9 月 8 日
Thanks for that. I think I had spent too long looking for an in-built method to solve my problem. Should have just used some common sense...
Cheers.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by