Problem with figure reduction
古いコメントを表示
Hi, i am plotting robot position that i update with a while loop on a figure, but there is an issue. I cannot reduce the window. In fact, i can but at every new iteration the figure just come back on the foreground. Is there a solution to fix it ? Thank you, Baptiste.
3 件のコメント
Daniel Frisch
2017 年 8 月 7 日
You probably call the figure command on the figure handle during the loop: figure(3); figure(h); This brings an existing figure to foreground. Avoid this, and provide the handle directly to the plot() method to make sure the data is still plotted into the right figure.
Baptiste Ranguetat
2017 年 8 月 7 日
Baptiste Ranguetat
2017 年 8 月 7 日
回答 (1 件)
Amy
2017 年 8 月 10 日
Both of your functions include the line
axes(self.axeSimulation);
This command makes 'self.axeSimulation' the current axes AND brings its parent figure into focus, which is why your figure is returning to the foreground. If you just want to set 'self.axeSimulation' as the current axes without bringing it into focus you can replace the call to 'axes' with a call to 'set' (where 'fig' is the handle to the parent figure of 'self.axeSimulation'):
set(fig, 'CurrentAxes', self.axeSimulation);
1 件のコメント
Jan
2017 年 8 月 10 日
The 'CurrentAxes' property might be changed, during the code runs, when a user dares to click in the GUI. Better do not rely on the 'CurrentAxes', but define the 'Parent' property directly.
Unfortunately, material and camlight do not expect a Parent as input. Sigh.
カテゴリ
ヘルプ センター および File Exchange で Lighting, Transparency, and Shading についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!