scatter3 -- plotting points with different colors attributes

7 vues (au cours des 30 derniers jours)
Roger Breton
Roger Breton le 22 Déc 2021
Commenté : Matt J le 23 Déc 2021
I would like to explore a different approach with my scatter3 plotting project.
So far, I'm using a custom data tip to identify numerically colors (3D points) that are outside the gamut of my output device :
As you can see, there are points that clearly lie outside the 3D volume of the 'destination gamut'. For example, the data point shown above is 10.3511. Now, I'd to explore the possibility of adding a 'white outline' to those points, to further drive home the idea that they are out of gamut, for my students. What would be my best approach?
I was thinking, perhaps, to construct a loop to sub-select all the point that have less than, say, 1 DeltaE, and store them in a 'inGamut' array. And sending the rest in an 'outGamut' array, and use two calls to scatter3; one call for the inGamut points, followed by a second call, where I would specify additional attribute such as "outline" (or stroke -- don't know how it's called in Matlab) for the outGamut points.
It's either than or go through all the points in a loop and have them plotted differently depending on their DeltaE value.
Which would be a good (easiest) approach?

Réponses (1)

Matt J
Matt J le 22 Déc 2021
Modifié(e) : Matt J le 23 Déc 2021
The first option sounds the closest to what I would do, except that I see no reason to use a loop. Just use logical indexing:
in=DE76<1; out=~in;
inGammut={X(in), Y(in), Z(in)};
outGammut={X(out), Y(out), Z(out)};
hold on
scatter3(inGammut{:},80,RGB,'filled');
scatter3(outGammut{:},_____);
hold off
  5 commentaires
Roger Breton
Roger Breton le 23 Déc 2021
By the way...
I tried running your code in a new script.
I wasn't expecting the deal function would break down the Lab [3 x n] variable (row1=L, row2=a, row3=b) into separate row vectors -- neat!
But the compiler complains that it does not recognize the 'deltaE' function :
Unrecognized function or variable 'deltaE'.
I suspect it needs a second argument, somehow...
Matt J
Matt J le 23 Déc 2021
Where I had DeltaE, I really meant DE76.

Connectez-vous pour commenter.

Catégories

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

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by