How to plot the on-off status matrix with elements displayed
3 次查看(过去 30 天)
显示 更早的评论
I want to plot a figure like this with matlab. The elements are presented and marked with differetn colors.

0 个评论
回答(1 个)
Walter Roberson
2022-5-11
image() with a colormap with two entries. If you need the labels then text() them into place. You can use find() to get row and column numbers. Remember that row numbers are y coordinates and column numbers are x coordinates.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Color and Styling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!