App Designer: UiAxes window size changes when zooming or maximizing the application
8 views (last 30 days)
Show older comments
Hello,
First, I wanted to say that I changed DataAspectRation and PlotBoxAspectRation to 1,1,1 and DataAspectRationMode and PlotBoxAspectRatioMode to manaul because I want a linear plot.
Linear Plot with manual mode: Non Linear Plot with auto mode:
In Auto mode, the plot size is perfect, but it becomes nonlinear. In manual mode the plot size is smaller but linear.
Also, when I zoom out or maximize the application, the plot size changes, sometimes the plot becomes very small and goes to the right left corner. The behavior is very unpredictable.
The chart should have a fixed size and be as large as possible.
The next problem is the delay when I zoom. It looks like the plot wants to change to the initial zoom position for 1 second.
Even if the plot is perfectly snapped, like in the next picture, I can't zoom out and in, I have to move the plot first and then zoom out and in.
I have a video for you to better understand all the questions.
You can see when I maximize the application for a second, the size of the plot gets smaller, and eventually it takes on that size and doesn't change.
You cant see this in the video, i coudnt reproduce it :/
Also i have all settings for the UIAxes listed here:
Do u have any idea, how to fix that?
(I use MATLAB R2021a.)
Thanks!
Mücahit.
3 Comments
J. Alex Lee
on 8 Aug 2021
Yea, but think about the whole purpose of being able to set DataAspectRatio, which is to display things squarely independently of the XLim and YLim you choose...so actually instead of what I suggested above, you can just not use DataAspectRatio and compute the limits manually such that when filling the area (default behavior) you will have the correct aspect ratio.
If you don't actually need the axes, one option could be to set the axes visibility off, and color the axes background to white. Wouldn't work if you actually wanted to display the axes.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!