On Sep 14, 2011, at 1:47 PM, Philip Hahn wrote:
> Greetings,
>
> I have 3 subplots and the titles/labels overlap in the plot output and when printed. Is there any way to specify additional padding to avoid this overlap? Sample code below:
>
> thanks,
>
> philip
>
> (create any function x,y,t with abscissa dx,dy,dt)
>
> % plot
>
> subplot(3,1,1);
>
> p=plot(dx, x);
> set(gca,'FontSize',18);
> set(p,'LineWidth',2);
> axis([0,0.05]);
> xlabel('x/D');
> ylabel('R(x,x+r)');
> % title(strcat('Two-Point Correlation ', char(label(ind)), ' protuberance.'));
>
>
> subplot(3,1,2);
>
> p=plot(dy, y);
> axis([-0.06,0.06]);
> set(gca,'FontSize',18);
> set(p,'LineWidth',2);
> xlabel('y/D');
> ylabel('R(y,y+r)');
> % title(strcat('Two-Point Correlation ', char(label(ind)), ' protuberance.'));
>
>
> subplot(3,1,3);
>
> p=plot(dt(1:50), t(1:50));
>
> set(gca,'FontSize',18);
> set(p,'LineWidth',2);
> axis([0,0.0001]);
> xlabel('t');
> ylabel('R(t,t+\tau)');
> % title(strcat('Autocorrelation ', char(label(ind)), ' protuberance.'));
>
> print('-dpng',strcat('TPCxyz',char(prefixy(ind)),'.png'));
> end
You can adjust the position of each axes by modifying their "position" property.