필터 지우기
필터 지우기

Obtain opacity of primitive line

조회 수: 1 (최근 30일)
Christian Wissing
Christian Wissing 2018년 3월 12일
Hi all,
is there a way to obtain the alpha value of a standard primitive line after plotting?
For example:
x = 0:0.1:2*pi;
y = sin(x);
fh = figure();
ph = plot(x,y);
ph.Color(4) = 0.5; % Changes opacity
% Query color fails:
pf.Color(4) % <-- Error: Index exceeds matrix dimensions.
fh.Children.Children.Color % Results in
ans =
0 0.4470 0.7410
fh.Children.Children.Color(4) % <-- Also fails: Index exceeds matrix dimensions.
Regards, Christian

답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by