scatter plot with different legend and color

1 回表示 (過去 30 日間)
Yaser Khojah
Yaser Khojah 2018 年 10 月 4 日
コメント済み: Yaser Khojah 2018 年 10 月 4 日
I'm trying to make a scatter plot for two vectors mean_vector_15 (1X8) and STD_Vector_15 (1X8). I want to make each dot with different color and I want to show its legend. Can anyone please help.
if true
% code
figure
pointsize = 12;
colormat = Mean_Vector_15;
scatter(STD_Vector_15,Mean_Vector_15, pointsize,colormat);
title('Reservoir Uncertainty with 15% STD ')
xlabel('NPV STD, ($B)')
ylabel('Epected NPV($B)')
legend({'M','2S','S','-2S','-S','P10','P50','P90'})
end
Thanks so much for looking into this.

採用された回答

jonas
jonas 2018 年 10 月 4 日
You could use
gscatter(x, y, 1:numel(x))
  1 件のコメント
Yaser Khojah
Yaser Khojah 2018 年 10 月 4 日
Thanks a lot

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

その他の回答 (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