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

4 visualizaciones (últimos 30 días)
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)

Respuestas (0)

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by