Custom colors on plots
Afficher commentaires plus anciens
Hi, i'm trying to plot:
x=[1,2,3,4,5,6,7,8,9];
y=[9,8,7,6,5,4,3,2,1];
which gives me a straight line,
I also have a third array
height=[0,0,2,3,0,0,2,1,0];
I want to plot markers on the plot above whenever height(i) is not equal to 0.
I can do this by using:
plot(xVal,yVal,'ks','markerfacecolor',[0 0 0]);
however this only works for black/default colours. I want to be able to have different shades of blue for each marker depending on how large height(i) is for each point.
How can I get custom colors?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Scatter Plots 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!
