how to increase the height of sublpot?
显示 更早的评论
Hello everyone,
Hope all of you are doing fine. Does any of my friend have any idea how to increase the height of subplot? I am using the following code to make eight subplots in four rows and two columns to see some variation in my data. But the final plot of all the subplots are not sufficiently high enough to see the variation. Can anybody tell me how can I increase the height of all the subplot in the following code:
for i = 13:30
dailydata = (timevec(:,3) == i);
figure
x1 = timevec( dailydata == 1,4 ) + timevec( dailydata == 1,5 )./60 ;
subplot(4,2,1);
plot(x1,denuder(dailydata == 1),'bo-','MarkerSize',2);
set(gca,'xlim',[0 24],'xtick',[0:2:24],...
'xticklabel',[0:2:24])
ylabel('Denuder (C)','FontSize',10);
title(datestr(timevec( find(dailydata == 1,1) ,:), 'yyyy-mm-dd'));
subplot(4,2,2);
plot(x1,htd_Line(dailydata == 1),'go-','MarkerSize',2);
set(gca,'xlim',[0 24],'xtick',[0:2:24],...
'xticklabel',[0:2:24])
ylabel('Htd line (C)','FontSize',10);
title(datestr(timevec( find(dailydata == 1,1) ,:), 'yyyy-mm-dd'));
subplot(4,2,3);
plot(x1,impactor(dailydata == 1),'mo-','MarkerSize',2);
set(gca,'xlim',[0 24],'xtick',[0:2:24],...
'xticklabel',[0:2:24])
ylabel('Impactor (C)','FontSize',10);
subplot(4,2,4);
plot(x1,case_1130(dailydata == 1),'ro-','MarkerSize',2);
set(gca,'xlim',[0 24],'xtick',[0:2:24],...
'xticklabel',[0:2:24])
ylabel('1130 case (C)','FontSize',10);
subplot(4,2,5);
plot(x1,pump(dailydata == 1),'ko-','MarkerSize',2);
set(gca,'xlim',[0 24],'xtick',[0:2:24],...
'xticklabel',[0:2:24])
ylabel('Pump (L)','FontSize',10);
subplot(4,2,6);
plot(x1,RPF(dailydata == 1),'co-','MarkerSize',2);
set(gca,'xlim',[0 24],'xtick',[0:2:24],...
'xticklabel',[0:2:24])
ylabel('RPF (C)','FontSize',10);
subplot(4,2,7);
plot(x1,pyro(dailydata == 1),'yo-','MarkerSize',2);
set(gca,'xlim',[0 24],'xtick',[0:2:24],...
'xticklabel',[0:2:24])
ylabel('Pyro (C)','FontSize',10);
xlabel('Time (hours)','FontSize',12);
subplot(4,2,8);
xxx = plot(x1,case_1135(dailydata == 1),'mo-','MarkerSize',2);
set(gca,'xlim',[0 24],'xtick',[0:2:24],...
'xticklabel',[0:2:24])
ylabel('1135 case (C)','FontSize',10);
xlabel('Time (hours)','FontSize',12);
saveas(xxx, strcat('SS file_daily plot\',datestr(timevec(find(dailydata == 1,1),:), 'yyyy-mm-dd')),'pdf');
end
Thank you very much in advance.
回答(1 个)
Matt Fig
2012-9-7
0 个投票
Did you try two rows and four columns? This might be better if your monitor is wider than tall, like mine. Other than that, just save the handle to each subplot then use SET to increase their size via the position property.
4 个评论
Md. Moklesur Rahman
2012-9-9
h = subplot(2,3,4);
plot(rand(10,1));
myPos = get(h,'Position');
%higher
myPos(4) = 2*myPos(4);
set(h,'Position',myPos);
You will need to adjust so your plots don't overlap.
Position vector = position of your axes -> [lower_left_x lower_left_y width height]
Md. Moklesur Rahman
2012-9-10
Md. Moklesur Rahman
2012-9-10
类别
在 帮助中心 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!