How to visualize a table in a color dot plot?

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일

2 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Line Plots에 대해 자세히 알아보기

태그

질문:

2022년 5월 13일

답변:

2022년 5월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by