plotting data with label in 4th column

6 vues (au cours des 30 derniers jours)
Sahithya S Iyer
Sahithya S Iyer le 19 Avr 2017
Commenté : Sahithya S Iyer le 19 Avr 2017
Hi,
I have a data that looks like this (snippet) -
104.000000 128.599991 3876.100211 1921
98.199997 135.800003 2103.948191 1922
132.299988 135.199997 6265.961561 1923
I have made a heat map of this data using X Y and Z columns. I would now like to label only the points that fall in a certain region of the heat map. The labels may be taken from the 4th column. I have attached the heat map. Can someone please help me with this..
  3 commentaires
Sahithya S Iyer
Sahithya S Iyer le 19 Avr 2017
For instance in the image attached the plot is "labeled" with x and y co-ordinates. Similarly I want to label only the dark colored points with values appearing on the 4th column.
Basically I want to know the identity of only those points (in terms of values in the 4th column) that are darkly colored.
Walter Roberson
Walter Roberson le 19 Avr 2017
Which heatmap routine are you using? Knowing that might make it easier to figure out which points are "darkly colored"

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 19 Avr 2017
Modifié(e) : Walter Roberson le 19 Avr 2017
For example,
mask = (X >= 50 & X <= 100) & (Y < 50 | Y > 250);
xm = X(mask);
ym = Y(mask);
Lm = cellstr( int2str(Labels(mask)) );
text(xm, ym, Lm);
  1 commentaire
Sahithya S Iyer
Sahithya S Iyer le 19 Avr 2017
Thanks ! This works beautifully !

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Distribution Plots 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!

Translated by