Azzera filtri
Azzera filtri

Colormap based on order in heatmap

3 visualizzazioni (ultimi 30 giorni)
Joep van de Ven
Joep van de Ven il 13 Ott 2022
Commentato: Joep van de Ven il 14 Ott 2022
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.

Risposte (0)

Categorie

Scopri di più su Data Distribution Plots in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by