Changing the interpolation behavior in patch for 'FaceAlpha'.

3 ビュー (過去 30 日間)
Rohan Ramesh
Rohan Ramesh 2019 年 11 月 17 日
コメント済み: Rohan Ramesh 2019 年 11 月 22 日
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.

採用された回答

Raunak Gupta
Raunak Gupta 2019 年 11 月 22 日
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.
  1 件のコメント
Rohan Ramesh
Rohan Ramesh 2019 年 11 月 22 日
Excellent.
Thank you very much.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePolygons についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by