How can I set "legend" and "text" to an UIAxes? (app designer)
164 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Giulia Di Giorgio
el 12 de Mzo. de 2023
Comentada: Giulia Di Giorgio
el 12 de Mzo. de 2023
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 comentarios
Respuesta aceptada
Cameron
el 12 de Mzo. de 2023
Editada: Cameron
el 12 de Mzo. de 2023
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 comentarios
Voss
el 12 de Mzo. de 2023
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Legend en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!