Plot in a figure of a gui and simultaneously open a new figure
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi!I have a gui with two figure, the main one and another one that I use to set parameters. In the main one I have two axes, in one I have a "static" plot, in the other one I plot continuously with a while().My problem is that when I open the second figure while I am plotting in the main one, I see the "dinamic" plot in the open one and not in the main gui. How can I set the axes and the figure so that I always see my plot in the correct axes?Thank you so much!
댓글 수: 0
답변 (1개)
TastyPastry
2016년 5월 27일
You can switch the focus between an axes and figure by calling them with an output, the figure handle, and using the axes() and figure() functions.
For example:
fig1 = figure();
ax = axes();
fig2 = figure();
Creates two figures with an axes on the first figure.
Here, because fig2 was called last, the focus is on fig2. If I were to call gcf (get current figure), I'd get fig2's properties.
If I want to plot on fig1's axes:
axes(ax);
Will automatically switch focus to fig1, the parent of ax.
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!