How to acieve a scatter plot like this.

1 回表示 (過去 30 日間)
Andreas Christensen Sørensen
Andreas Christensen Sørensen 2018 年 12 月 14 日
コメント済み: Star Strider 2018 年 12 月 15 日
Hi I have to do a scatter plot where each point in e.g. the xy-plane consist of determined value. My question is how do i plot a discrete amout of values where each of the values is related to a x, y-coordinate. I have seen reports with plots similar to the one presenten in the picture: scatter mesh.PNG
Hope to hear your input.
Best regards.

採用された回答

Star Strider
Star Strider 2018 年 12 月 14 日
Use the surf (link) function and the view (link) function:
M = nan(50);
M(10:40, 5:30) = rand(31,26);
figure
surf(M)
view(0,90)
axis([1 size(M,1) 1 size(M,2)])
grid on
How to acieve a scatter plot like this - 2018 12 14.png
  2 件のコメント
Andreas Christensen Sørensen
Andreas Christensen Sørensen 2018 年 12 月 15 日
Thank you very much, appreciate it :)
Star Strider
Star Strider 2018 年 12 月 15 日
As always, my pleasure!

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

その他の回答 (1 件)

Stephen23
Stephen23 2018 年 12 月 14 日
編集済み: Stephen23 2018 年 12 月 14 日
One simple option is to use pcolor:
>> M = randi([-3,6],5,7);
>> M([3,4,5,9,10,15]) = NaN;
>> pcolor(1:7,1:5,M)
temp6.png
You can view many plotting functions here:
  1 件のコメント
Andreas Christensen Sørensen
Andreas Christensen Sørensen 2018 年 12 月 15 日
Thank you very much, appreciate it :)

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

カテゴリ

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

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by