Borrar filtros
Borrar filtros

Obtain opacity of primitive line

1 visualización (últimos 30 días)
Christian Wissing
Christian Wissing el 12 de Mzo. de 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

Respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by