Probability visualization with color scale

7 Ansichten (letzte 30 Tage)
Emma Kuttler
Emma Kuttler am 30 Nov. 2019
Kommentiert: Image Analyst am 1 Dez. 2019
Hi, I have a 296x296 matrix. Each cell in the matrix represents a probability of occurence, [0,1]. I want to create a grid or heatmap where the color of the square corresponds to the probability of occurence - the darker the cell the greater the probability. I have used histogram bins for this matrix and it didn't really represent the data the way that i wanted. I'd like to have something similar to this below, which was done using color scales in Excel.

Akzeptierte Antwort

Image Analyst
Image Analyst am 30 Nov. 2019
imshow(yourMatrix, []);
colormap(hsv(256));
colorbar;
  2 Kommentare
Emma Kuttler
Emma Kuttler am 30 Nov. 2019
This works! Is there a different way to add the tic marks on the axes? They aren't visible even when I change the size in figure properties.
Image Analyst
Image Analyst am 1 Dez. 2019
axis('on', 'image');

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Data Distribution Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by