How can I change the grid color depending of another value?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Roberto Bistel
le 12 Août 2019
Commenté : KALYAN ACHARJYA
le 13 Août 2019
Hi!
I need to fill a cell with a color that changes according to a set of values that I have.
For example:
A = [1 2 3 4];
B = [5 6 7 8];
C = [9 10 4 3];
I attached a file with some data test generated from pi.
From the file: A is (:, 1), B is (:, 2), C is(:, 3).
I tried the fill () function and I only get the same color for the whole set of values. Also, I tried with the .FaceColor property
And with the image () function
Best regards
0 commentaires
Réponse acceptée
KALYAN ACHARJYA
le 12 Août 2019
Modifié(e) : KALYAN ACHARJYA
le 12 Août 2019
Is this one?
A = [1 2 3 4];
B = [5 6 7 8];
C = [9 10 4 3];
colormap
image([A;B;C]), colorbar
4 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Colormaps dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!