필터 지우기
필터 지우기

Colormap based on order in heatmap

조회 수: 3 (최근 30일)
Joep van de Ven
Joep van de Ven 2022년 10월 13일
댓글: Joep van de Ven 2022년 10월 14일
I am working on a heatmap to visualize specific test results. The data consists of 10 values between 0 and 0.1 which are not normally distributed:
0.0920200000000000 0.0926500000000000 0.0960900000000000 0.0955800000000000 0.0931500000000000
0.0942300000000000 0.0963800000000000 0.0938100000000000 0.0936100000000000 0.0926700000000000
I am looking for a way to heatmap these values and color them according to their position in the order hierarchy.
[Up_sort,Up_sort_I] = sort(Current_up_means,'descend');
A = [flip( ...
Current_up_means(6:10));
Current_up_means(1:5)];
A = figure();
heatmap(A,"Colormap",ndvi_colormap);
This results in the following var:
Up_sort_I = 2 7 8 6 1 3 9 4 10 5
Now my goal is to color the values according to their rank just like Excel does in Conditional formatting from rank 1 to 10 Green to Red. So not based on value but simply on its place within that dataset hierarchy. So how can i use Up_sort_I as an input for the color while maintaining the vizualized original values? It is important that the values remain in their original position as im visualizing production defects.
  댓글 수: 1
Joep van de Ven
Joep van de Ven 2022년 10월 14일
managed to fix it with imagesc()

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

답변 (0개)

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by