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

I want to plot a figure like this with matlab. The elements are presented and marked with differetn colors.

Antworten (1)

Walter Roberson
Walter Roberson am 11 Mai 2022

0 Stimmen

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 Kommentar

How can I draw the edges for each small colored squares and scale the colorbar(0 the min -color and 1 the max-color).

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Color and Styling finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2019b

Gefragt:

am 11 Mai 2022

Kommentiert:

am 16 Mai 2022

Community Treasure Hunt

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

Start Hunting!

Translated by