R2014b: How to make the filled areas in contourf semi-transparent?

1 回表示 (過去 30 日間)
Johannes Korsawe
Johannes Korsawe 2015 年 1 月 26 日
コメント済み: Boris Belousov 2016 年 2 月 25 日
(At least) in Release 2014b, the contourf - command returns a Contour object, which may be filled or not, but there is no such thing as a "FaceAlpha"-property. The question is, how to make these filled areas nonetheless appear semi-transparent ???
Example:
[cc,hc]=contourf(peaks,[0.02,0.02]);
(I have already tried to work with the returned contour matrix cc and fill-commands, but it is hard to do this if - as here is the case - the borders of the axes are touched.)

回答 (1 件)

Garrett Barter
Garrett Barter 2015 年 3 月 5 日
I struggled with this too. If you use "pcolor" instead of "contourf" this is possible. For instance,
h = pcolor(X,Y,Z); set(h,'EdgeAlpha',0,'FaceAlpha',0.7);

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by