Effacer les filtres
Effacer les filtres

Colormap based on order in heatmap

3 vues (au cours des 30 derniers jours)
Joep van de Ven
Joep van de Ven le 13 Oct 2022
Commenté : Joep van de Ven le 14 Oct 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.
  1 commentaire
Joep van de Ven
Joep van de Ven le 14 Oct 2022
managed to fix it with imagesc()

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Data Distribution Plots dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by