필터 지우기
필터 지우기

Probability visualization with color scale

조회 수: 3 (최근 30일)
Emma Kuttler
Emma Kuttler 2019년 11월 30일
댓글: Image Analyst 2019년 12월 1일
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.

채택된 답변

Image Analyst
Image Analyst 2019년 11월 30일
imshow(yourMatrix, []);
colormap(hsv(256));
colorbar;
  댓글 수: 2
Emma Kuttler
Emma Kuttler 2019년 11월 30일
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 2019년 12월 1일
axis('on', 'image');

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by