How to visualize a table in a color dot plot?

1 回表示 (過去 30 日間)
Joao Paulo
Joao Paulo 2022 年 5 月 13 日
回答済み: KSSV 2022 年 5 月 13 日
Hello!
I have a table with some values:
And I want to display the table in a graph like this:
Basically when the value is 0 nothing happens, when is negative is a blue dot and when is positive is a red dot.
Does anyone know how to do this?
Thanks!

採用された回答

KSSV
KSSV 2022 年 5 月 13 日
Let A be your matrix.
[m,n] = size(A) ;
[X,Y] = meshgrid(1:m,1:n) ;
figure
hold on
plot(X(A<0),Y(A<0),'.b')
plot(X(A>0),Y(A>0),'.r')

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by