フィルターのクリア

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 Center および File Exchange2-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