Patch - controlling transition of transparency - how to?
Afficher commentaires plus anciens
I made a plot where the patch background goes from a specific color to full transparency (not white color).
Question is: I would like to change the transparency limits and don't know how. You can see that for some peaks the blue color goes from deep blue to full transparency. Some of them don't, and I don't like that. I want every peak to have a transition from full blue to full transparency. Or better - precisely control it from-to. How to do it please?
I'm stuck on the FaceVertexAlphaData property and have no idea exactly what to put in it and how.

Working code snippet for all blue peaks:
% fit(:,1) is for X data, fit(:,i) is for Y data; data are in a columns
for i = 2:9
patch(fit(:,1),fit(:,i),'b','edgecolor','none','FaceAlpha','interp','FaceVertexAlphaData',fit(:,i)); % background
plot(fit(:,1),fit(:,i),'Color','b'); % edges
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Polygons dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


