![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1574477/image.png)
avec app designer je veux passé une variable en entree de mon propre component
조회 수: 1 (최근 30일)
이전 댓글 표시
Bonjour, j'ai créé une app ainsi qu'un component, j'aimerai que ce dernier puisse travailler sur un Axes en particulier (je ne souhaite pas utiliser gca car j'en ai plusieur).
Merci d'avance
댓글 수: 0
답변 (1개)
Angelo Yeo
2023년 12월 22일
Please excuse my answer is in English. I do not speak French, but I was accidently the first one who would answer your question.
1) When you add axes into canvas, you would get object names for each axis. By default, the axes will have their names "app.UIAxes", "app.UIAxes2", etc accordingly.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1574477/image.png)
2) You can pass these axis objects to functions. For example, plot provides options to use axis as its first input argument in order to specify in which axes you want to plot graphes.
plot(ax, ___ )
Hence, for example, if you would want to plot a graph on the first UIAxes, you can code something like this:
x = 1:10; y = 1:10;
plot(app.UIAxes, x, y); % instead of only plot(x, y);
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!