Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Switching from matlab 2013b version to 2020b version. Legend command with line handles
조회 수: 2 (최근 30일)
이전 댓글 표시
hello All i switched from old 2013b matlab version to new 2020b matlab version.
In my existing scripts written originally in 2013b
now i think some issue with legend comand (legend on plots identified by handles), ill try to explain
Earlier (2013b),
ep_hdl=plot(0,0,'Visible','off','Color','k');
hleg2=legend([ep_hdl,ep_hd2], {'legend_name1','legend_name2'});
%ep_hd1 and ep_hd2 are line handles
here hleg2 used to return a handle of type double and below line i.e. leg_line used to contain line handles for both line
leg_line=findobj(hleg2,'type','Line');
Now in 2020b,
%when i use same code my leg_line is empty
leg_line=findobj(hleg2,'type','Line');
댓글 수: 2
Rik
2021년 9월 8일
So this code was essentially retrieving the plot handles? That seems a strange way to do it, and I don't really see a good reason why this behavior existed in HG1 (or at least R2013b).
Why don't you describe what you actually want? That way you can keep focussed on reproducing the intended effect, instead of trying to fix single lines of code.
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!