axes position differs between two consecutive GUI executions
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Hey,
An axes in my GUI is behaving differently between two consecutive executions of my GUI.
When I start Matlab and then run my GUI, the mentioned axes' position is not where it is supposed to be. When I close the GUI and immediately afterwards restart the GUI the said axes is in its supposed to be position. I can then restart the GUI as often as I want and the axes behaves as expected and is in its right position. It is only when I freshly start Matlab, and right after that the GUI, that it behaves as described above.
I desinged the GUI using GUIDE and I do some GUI initilizations in the OpeningFcn. However, as far as I know I nowhere modify the position of the mentioned axes. GUIDE is the only way I modified the axes position.
I have no idea how to provide a minimal working example to show what I mean. Hence, see the picture below that shows a "Wrong-Right"-screenshot of the GUI to get an impression.
Any idea what the problem might be and how to solve it?
Thank you alot in advance!
Best regards
Hannes

6 Comments
Adam
on 26 Sep 2014
I guess I'm just tired, but honestly I can't see any difference!
Geoff Hayes
on 26 Sep 2014
The left-most axes is just raised slightly in the left image. So does this appear only on the first time that you run the GUI after having launched MATLAB, and every subsequent time that you launch it (from within that session) the axes is correctly placed? If so, what happens if you start MATLAB, launch the GUI, observe the incorrectly placed axes, then in the Command Window type clear all, and relaunch the GUI. What is the result of the axes position?
Hannes
on 27 Sep 2014
Hannes
on 27 Sep 2014
Have you tried programatically setting it's position in the Opening Fcn to what it is supposed to be? Obviously logically that is a silly thing to do since GUIDE already has the correct position, but you never know, it may work.
I have had some issues, not quite like that, but similar with my GUIs where I plot an image and my axes move slightly when the image is plotted. I never looked into why as it seemed to difficult too pin down, but I also hadn't given any position instructions other than those in GUIDE.
(Now that it is morning I can easily see the difference now!!)
Hannes
on 27 Sep 2014
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!