How can I set "legend" and "text" to an UIAxes? (app designer)
조회 수: 61 (최근 30일)
이전 댓글 표시
Hello, which functions can I use to include legend and text in my App plot? The version for regular code is this one:
legend('datos','ajuste',"location","best");text(10,0.155,strcat('R²= ',Rcuadrado))
댓글 수: 0
채택된 답변
Cameron
2023년 3월 12일
편집: Cameron
2023년 3월 12일
You need to specify the axes within App Designer. Try this:
%use whatever your UIAxes name is. I assumed it was app.UIAxes
legend(app.UIAxes,'datos','ajuste',"location","best");
text(app.UIAxes,10,0.155,strcat('R²= ',Rcuadrado))
댓글 수: 3
Voss
2023년 3월 12일
The text is placed at the point (10,0.155). The point (10,0.155) is outside the limits of the axes. That's why you don't see the text.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Legend에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!