Changing the interpolation behavior in patch for 'FaceAlpha'.

3 vues (au cours des 30 derniers jours)
Rohan Ramesh
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.

Réponse acceptée

Raunak Gupta
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)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by