App designer is resizing my UIAxes when they are plotted.

7 visualizzazioni (ultimi 30 giorni)
Hi, I am designing an app with multiple Axes, I'm nearly finished and all of a sudden Matlab is re-sizing my Axes every time they are plotted. I'm not sure why this is happening now. I want the plots to have the same size no matter the input, and each axis within each plot to have equal size (1:1:1 ratio).
I have tried this code, the last two lines being my attempt at fixing this issue:
% Button pushed function: PlotNewDipoleButton
function PlotNewDipoleButtonPushed(app, event)
% update 2D and 3D plots with user-specific information for
% potential survey areas
[Bat]=mvf_plane([app.minc,app.mdec,app.m],app.Ba_mag,app.Ba_inc,app.Ba_dec,30,1,app.alt);
surf(app.UIAxes2,Bat);
ylim(app.UIAxes2, [0 60]);
xlim(app.UIAxes2, [0 60]);
view(app.UIAxes2,2);
surf(app.UIAxes3,Bat);
ylim(app.UIAxes3, [0 60]);
xlim(app.UIAxes3, [0 60]);
view(app.UIAxes3,3);
ztickformat(app.UIAxes3,'%g');
app.UIAxes3.PlotBoxAspectRatio = [1 1 1];
app.UIAxes3.PlotBoxAspectRatioMode = 'manual';
Here are the plots:
You can see they are being stretched out further than the app borders. If I chnage some of the inputs:
Any help is appreciated, thanks.
  1 Commento
Allen
Allen il 1 Mar 2021
Joshua,
Do the axes position properties change at all? From your screenshots, it appears like that might be occurring. Either way it looks like this may be bug in MATLAB that needs to be reported.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange

Prodotti


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by