Filter löschen
Filter löschen

Obtain opacity of primitive line

1 Ansicht (letzte 30 Tage)
Christian Wissing
Christian Wissing am 12 Mär. 2018
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

Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by