MATLAB: UIAxes does not fill UIFigure and appears small

axesMATLABposition;size;smalluiaxesuifigure

I am using App Designer and have noticed that UIAxes does not position well on the UIFigure.
When I use "axes", it fits nicely in the figure.
>> fig=figure;
>> ax=axes(fig,'Units','Pixels');
However, when I use "UIAxes", it does not fill the UIFigure completely, and it appears small on the bottom of the figure.
>> uifig=uifigure;
>> uiax=uiaxes(uifig);
Why is this happening?

Best Answer

As you correctly mentioned, currently the UIAxes fills only partially the space occupied by the UIFigure. We thank you for your feedback and our development team will consider it for a future release of our software.
For now, the workaround is to set the position of the UIAxes. Below is an example where UIAxes fills the whole UIFigure.
>> uifig=uifigure;
>> uiax=uiaxes(uifig);
>> uiax.Position = [uiax.Position(1:2) [uifig.Position(3:4) - 2*uiax.Position(1:2)]]
Below is the final UIFigure with a repositioned UIAxes.