フィルターのクリア

Setting line HandleVisibility to 'callback' does not remove legend entry in R2018b?

2 ビュー (過去 30 日間)
M Carpenter
M Carpenter 2019 年 6 月 14 日
編集済み: M Carpenter 2019 年 6 月 14 日
I have an old figure-formatting script I used ot run in R2016b (attached) that takes a previously created figure and changes colours, converts strings (DisplayName, Title.String, etc.) to latex markup, changes interpreter to latex and makes the lines on one of the axes invisible to the legend.
Since updating to R2018b, the final step, making the lines on one axis invisible to the legend, no longer works. I previously had to refresh the legend via a simple script, but now that throws an error since R2018b no longer has that property for a Legend.
I have included an example yyaxis plot to help.
Thank you in advance to anyone who can help me!
Code Excerpt
...
% set current axis to secondary axis
yyaxis(ax,lrscnd)
% loop over children lines on second axis
for ii = 1:length(pl{axscnd})
% set HandleVisibility to callback
pl{axscnd}(ii).HandleVisibility = 'callback';
end
...
Result
Expected Result
(from different graph with different labels, but showing lines of only one axis)

回答 (0 件)

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by