how to increase the height of sublpot?

3 次查看(过去 30 天)
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
Matt Fig 2012-9-7
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
Thanks Jose. But I still have problem. When the number position is more than 4 I get the following error:
??? Attempted to access myPos(5);
index out of bounds because numel(myPos)=4.
But I need to apply for an array of (8,2, 1:16) to double the size of the subplot. Would you please tell how can I do that?
Thanks again.
Md. Moklesur Rahman
Ohhh, I got the point. myPos(4) is fixed for all the subplots but now subplots are overlapping. How can I manipulate the value for position vector ? I mean what is the default value and how can change in order to avoid the overlapping of plots?
Thanks

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by