How to visualize a table in a color dot plot?
1 次查看(过去 30 天)
显示 更早的评论
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!
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!