custom alpha-data in surface plot
3 ビュー (過去 30 日間)
古いコメントを表示
I am plotting multiple surfaces in one figure. Now I want to make the areas of the plot close to zero a transparency-gradient. For example
if z(i,j) >= 0 && z(i,j) <= 0.1
transparancy(i,j) = 1-z(i,j)/0.1;
else
transparancy(i,j) = 0;
end
I tried using the 'alpha' function and the colormap method but didn't succeed. Can anybody help me on my way?
0 件のコメント
回答 (1 件)
Walter Roberson
2013 年 9 月 18 日
Do not use the alpha function: use the AlphaData property of the surface object.
surf(z, 'AlphaData', transparancy)
参考
カテゴリ
Help Center および File Exchange で Lighting, Transparency, and Shading についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!