Obtain opacity of primitive line

1 次查看(过去 30 天)
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