# How can increase the size of a plot with multiple plots

12 views (last 30 days)
Anurodh Saxena on 12 Nov 2015
Answered: Ilham Hardy on 12 Nov 2015
I am using plot command to plot 16 graphs on one figure. But when curves are plotted they are small and leaves lot of space in the corner of the figure and also leaves lot of space in between two graphs. I cannot find any command to decrease the side space or in between space between graphs.
##### 0 CommentsShow -1 older commentsHide -1 older comments

Sign in to comment.

### Accepted Answer

Thorsten on 12 Nov 2015
##### 0 CommentsShow -1 older commentsHide -1 older comments

Sign in to comment.

### More Answers (1)

Ilham Hardy on 12 Nov 2015
Hi,
Once upon a time :), I stumbled into this old but gold function.
It helps me cut the figure sizing/cropping works significantly.
I hope you know how to work with function,
function subplotsqueeze(hFig, nF)
% Stretch width and height of all subplots in a figure window
% subplotsqueeze(H, F) will stretch subplots in figure with handle H by the
% proportional factor F.
%
% Examples:
% subplotsqueeze(gcf, 1.2) will expand all axes by 20%
% subplotsqueeze(gcf, 0.8) will contract all axes by 20%
%
% Expansion and contraction is equal in both directions and axes remain
% centered on their current locations.
%
hAx = findobj(hFig, 'type', 'axes');
for h = 1:length(hAx)
vCurrPos = get(hAx(h), 'position'); % current position
set(hAx(h), 'position', (vCurrPos.*[1 1 nF nF])-[vCurrPos(3)*(nF-1)/2 vCurrPos(4)*(nF-1)/2 0 0]);
end
return
Hope this helps,
Ilham
##### 0 CommentsShow -1 older commentsHide -1 older comments

Sign in to comment.

### Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by