Borrar filtros
Borrar filtros

App designer is resizing my UIAxes when they are plotted.

4 visualizaciones (últimos 30 días)
Joshua Mitchell
Joshua Mitchell el 1 de Mzo. de 2021
Comentada: Allen el 1 de Mzo. de 2021
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 comentario
Allen
Allen el 1 de Mzo. de 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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by