Clustergram. Changing the range of the colorbar
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
From a 17x17 array, I've plotted the attached clustergram. The array values range from 1 to 5. The values on the diagonal are equal to 1.
I have the following questions:
- The colorbar values are obviously wrong. They range from -3 to 3. The correct range should should be 1 to 5. There no negative values in the array. I tried colormapeditor but failed to find an answer to this problem.
- Is there a way to change the colours of the clustergram to correspond to the colorbar (say "parula")?
6 commentaires
Réponse acceptée
Adam Danz
le 3 Mai 2021
Modifié(e) : Adam Danz
le 3 Mai 2021
The color scale is based on standardized values even if standardize is set to none.
You can set the range of standardized values as a scalar using,
cgo_all = clustergram(rd,___);
cgo_all.DisplayRange = ____
which adjusts the range of the colorbar but will still contain negative values because of standardization.
It may be helpful to review this example from the documentation that explains that the data are standardized so that the mean is 0 which is why colorbar values are +/-.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Polygons dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!