How to plot the on-off status matrix with elements displayed

1 回表示 (過去 30 日間)
Rongxing Hu
Rongxing Hu 2022 年 5 月 11 日
コメント済み: Rongxing Hu 2022 年 5 月 16 日
I want to plot a figure like this with matlab. The elements are presented and marked with differetn colors.

回答 (1 件)

Walter Roberson
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.
  1 件のコメント
Rongxing Hu
Rongxing Hu 2022 年 5 月 16 日
How can I draw the edges for each small colored squares and scale the colorbar(0 the min -color and 1 the max-color).

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

カテゴリ

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

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by