MATLAB Answers

0

Change opacity of Lines

Adi 님이 질문을 제출함. 24 Jul 2012
최근 활동 Royi Avital 님이 답변함. 29 Sep 2017
Hello everyone
I want to change the opacity of lines I plotted in a figure in MATLAB. I read somewhere about alpha and facealpha commands but couldn't figure how to use them. Could somoene please tell me how to do this?
Regards Adi

  댓글 수: 0

로그인 to comment.

답변 수: 2

Walter Roberson 님의 답변 24 Jul 2012
 채택된 답변

It is not possible to set the transparency of lines.
The workaround is to use very thin patches instead of lines, as you can change the EdgeAlpha property for patch edges, or the FaceAlpha property of patch faces; see http://www.mathworks.com/help/techdoc/ref/patch_props.html

  댓글 수: 0

로그인 to comment.


Royi Avital 님의 답변 29 Sep 2017

In newer versions of MATLAB you can do that easily using the Color property of the line.
By default it is RGB array (1 x 3). Yet if you set it to RGBA (1 x 4) the last value is the alpha of the color.
Enjoy...

  댓글 수: 0

로그인 to comment.



Translated by