plotting a graph with different size markers

4 ビュー (過去 30 日間)
asd ad
asd ad 2020 年 8 月 20 日
コメント済み: asd ad 2020 年 8 月 20 日
Hello everyone,
I would like to plot a graph with the data points as circles according to their sizes in diameter. The y-axis is the vertical distance and the x-axis is the horizontal distance. Furthermore, is it possible to colour the points from 1.53x10^-4 to 2.23x10^-4 in red and the rest in blue?
Thanks

採用された回答

KSSV
KSSV 2020 年 8 月 20 日
Read about scatter.
  5 件のコメント
KSSV
KSSV 2020 年 8 月 20 日
Read about indexing.
data = xlsread("Data.xlsx") ;
x = data(:,1) ;
y = data(:,2) ;
z = data(:,3) ;
sz = linspace(1,300,length(z));
scatter(y(1:74),z(1:74),sz(1:74),'filled','MarkerEdgeColor',[0 0 1],...
'MarkerFaceColor','r',...
'LineWidth',1.5)
hold on
scatter(y(75:end),z(75:end),sz(75:end),'filled','MarkerEdgeColor',[0 0 1],...
'MarkerFaceColor','b',...
'LineWidth',1.5)
asd ad
asd ad 2020 年 8 月 20 日
Thanks a lot for your help and recommendations. I've learnt a lot from 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