Reducing the distance among subplot figures?
415 views (last 30 days)
I am using a subplot option to plot parts of a figure. Is there is a possibility to reduce the distance between the two figures, without affecting their dimensions (as shown by the arrows). For example, we can create more columns in subplot, but I am avoiding that. Thanks.
Sulaymon Eshkabilov on 13 Aug 2021
Set up axis position of subplots, e,g:
x=0:1:360; y=-180:1:180; G = cos(x)+sin(y(:));
HA(1) = subplot(221);
HA(2) = subplot(222);
POS = get(HA(1), 'Position' )
POS(1) = 0.02 ; % Position move
POS(3) = 0.5 ; % Position move
set(HA(1), 'Position', POS) ;
DGM on 14 Aug 2021
This is a bit of a workaround, but I've been using it for a long time. It works in older versions and it doesn't require a bunch of tedious wrangling of plot properties.