I have a figure which has four subplots in it. The axes of the subplots are square when plotted. However when the figure is maximized, the subplots are no longer square. An example is provided below: figureHandle = figure; subplot(2,2,1), plot(exp(1:100)) subplot(2,2,2), plot(sin(0:pi/100:4*pi)) subplot(2,2,3), plot(log(0:30)) subplot(2,2,4), plot(1:40)
Prashant Kumar answered .
2025-11-20
% Extract axes handles of all subplots from the figure axesHandles = findobj(get(figureHandle,'Children'), 'flat','Type','axes'); % Set the axis property to square axis(axesHandles,'square')