Children of axes after using yyaxis right
6 ビュー (過去 30 日間)
古いコメントを表示
Why does children not include a and how would I get a(only using ax, b or c)?
% Create the axes object
ax = axes();
% Plot 'a' and 'b' using the same axes
a = plot(ax, 1:10, 1:10, 'DisplayName', 'Test');
yyaxis right
b = plot(ax, 1:10, ones(10, 1), 'DisplayName', 'TestRight');
hold on
c = plot(ax, 1:10, 0.5*ones(10,1), 'DisplayName', 'TestRight2');
% Access the children of the parent object
children = ax.Children
0 件のコメント
採用された回答
Adam Danz
2023 年 6 月 19 日
% Create the axes object
ax = axes();
% Plot 'a' and 'b' using the same axes
a = plot(ax, 1:10, 1:10, 'DisplayName', 'Test');
yyaxis right
b = plot(ax, 1:10, ones(10, 1), 'DisplayName', 'TestRight');
hold on
c = plot(ax, 1:10, 0.5*ones(10,1), 'DisplayName', 'TestRight2');
% Access the children of the parent object
yyaxis left
children = ax.Children
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Specifying Target for Graphics Output についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!