How can I programatically create a custom color gradient for a plot or markers?
Afficher commentaires plus anciens
I would like to create a plot with a color gradient that ranges from red to almost white. For example, I need 5 intermediate colors in a color vector where the darkest color is [1 0 0] and the lightest one is [1 1 1] in such a way that colors = [ [1 0 0] [? ? ?] [? ? ?] [? ? ?] [? ? ?] [? ? ?] [? ? ?] 1 1 1] ]. This means creating a color gradient manually in such a way that it ranges from red to light pink.
What is the simplest way to create this color vector programmatically?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Color and Styling dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

