What property of a line is related to the transparency / opacity or alpha of a line?
조회 수: 6 (최근 30일)
이전 댓글 표시
when i plot a line with transparency by means of rgba color triplet and opacity.
hline = plot(x,y,'color',[1,0,0,0.5])
What property of the resulting handle is changed? I cannot find anything in the color triplet, nor can i find a seperate property like 'Alpha' or 'FaceAlpha' or anything similar.
댓글 수: 0
채택된 답변
Ameer Hamza
2020년 10월 14일
편집: Ameer Hamza
2020년 10월 14일
This is an undocumented feature in MATLAB: http://undocumentedmatlab.com/articles/plot-line-transparency-and-color-gradient
You can access the alpha value using this line
alpha_val = hline.Edge.get.ColorData(4)
It is in uint8, you can convert to double
alpha_val = double(hline.Edge.get.ColorData(4))/255
댓글 수: 2
추가 답변 (0개)
참고 항목
카테고리
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!