# What are some good examples of non-continuous colormap applications?

35 vues (au cours des 30 derniers jours)
Emma Farnan le 18 Fév 2022
Modifié(e) : Stephen23 le 18 Fév 2022
I was looking through the colormaps available in MATLAB 2021b, and I was wondering if anyone had examples where the "discrete" colormaps (lines, colorcube, prism, and flag), are helpful in visualizing data or even just look good. The examples that MATLAB provides - flag webpage, colorcube webpage - seem to make the visualization examples worse than the default parula. Are they particularly well suited to coloring 3D shapes/contours (as the name "colorcube" seems to imply)?
If anyone has figures that make good use of these colormaps, I would love to see.
##### 1 commentaireAfficher -1 commentaires plus anciensMasquer -1 commentaires plus anciens
Stephen23 le 18 Fév 2022
Modifié(e) : Stephen23 le 18 Fév 2022
The COLORCUBE values are defined by linear MESHGRID sampling of the RGB cube, they are not defined in terms of a set of discrete colors. However it produces an odd jumble of disjointed continuous colors that is unlikely to be useful for very much.
"as the name "colorcube" seems to imply"
The name comes from the fact that it is defined by a regular sampling over the entire RGB cube, as a 3D plot shows:
M = colorcube(256);
scatter3(M(:,3),M(:,2),M(:,1),20,M,'filled')
LIke JET and other early colormaps it is based on fiddling around in the RGB cube, which is fundamentally flawed because the RGB cube is a rather poor relation to actual human color-perception, as explained here:

Connectez-vous pour commenter.

### Réponses (1)

Stephen23 le 18 Fév 2022
Modifié(e) : Stephen23 le 18 Fév 2022
"Are they particularly well suited to coloring 3D shapes/contours (as the name "colorcube" seems to imply)?"
No, not particularly.
Discrete colormaps are used to color data which are not continuous, e.g. discrete categories or groups or the like. You can search the internet for thousands of tutorials on "discrete vs continuous data".
Discrete colormaps are usually defined in terms a fixed set of colors, for example:
• FLAG (3 colors)
• PRISM (6 colors)
• LINES (whatever the current default axes ColorOrder has)
The LINES colormap gives a big hint as to what discrete colormaps are good for: they are commonly used for coloring plot lines, scatter plots, and other discrete data which need to be distinguished. The LINES colormaps is defined in terms of the axes ColorOrder, so the colormaps simply gives the user access to the same colors that are used by all commands that use the ColorOrder. Read more here:
"What are some good examples of non-continuous colormap applications"
The following page gives exactly what you asked for, good examples of discrete colormaps in use:
IMHO the (default) colormap LINES is an okay set of colors, whereas FLAG and PRISM are basically useless. Here are some other discrete colormaps:
Or generate your own set of discrete colors:
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Colormaps dans Help Center et File Exchange

R2021b

### Community Treasure Hunt

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

Start Hunting!

Translated by