How can I change the grid color depending of another value?

2 vues (au cours des 30 derniers jours)
Roberto Bistel
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
GridColor.png

Réponse acceptée

KALYAN ACHARJYA
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
1234.png
  4 commentaires
Roberto Bistel
Roberto Bistel le 12 Août 2019
Perfect!
thanks!
KALYAN ACHARJYA
KALYAN ACHARJYA le 13 Août 2019
Thanks @Adam for explanation

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Colormaps dans Help Center et File Exchange

Tags

Produits


Version

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by