Changing the interpolation behavior in patch for 'FaceAlpha'.
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Rohan Ramesh
le 17 Nov 2019
Commenté : Rohan Ramesh
le 22 Nov 2019
Hi,
I am trying to use the patch function to create a region with varying transparency in a 2D figure. However, setting 'FaceAlpha' to 'interp' only allows for a linear interpolation between vertexes. Is there any way to change the interpolation to another function? For example, a quadratic or cubic change in the transparency values.
Thank you.
0 commentaires
Réponse acceptée
Raunak Gupta
le 22 Nov 2019
Hi,
For interpolating with a different function I suggest providing ‘FaceVertexAlphaData’ in way that it captures the nature of the function, that is if quadratic interpolation is needed for vertices you may declare the FaceVertexAlphaData in a quadratic way. For example if 3 vertices are there then [1,4,9] will give same behavior as required. Currently for ‘FaceAlpha’ any other interpolation method is not present except flat and interp.
Hope it helps.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Polygons dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!