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 CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by