COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

figure border

• Email
• Follow

```Hi, guys,

I have a problem. When I use plotyy, and change the font size of the axes, i find the labels move out of the figure border, how to extend the figure's border so that the figure involves the labels? thanks

x = 0:0.01:0.02;
y1 = 200*exp(-0.05*x);
y2 = 2*x;
[AX,H1,H2] = plotyy(x,y1,x,y2,'plot');
set(get(AX(1),'Ylabel'),'String','Slow Decay')
set(get(AX(2),'Ylabel'),'String','Fast Decay')
set(AX(1),'FontSize',13)
set(AX(2),'FontSize',13)
```
 0

See related articles to this posting

```"Kaisen deng" <csudeng@126.com> wrote in message <i2g929\$r4c\$1@fred.mathworks.com>...
> Hi, guys,
>
> I have a problem. When I use plotyy, and change the font size of the axes, i find the labels move out of the figure border, how to extend the figure's border so that the figure involves the labels? thanks
>
> x = 0:0.01:0.02;
> y1 = 200*exp(-0.05*x);
> y2 = 2*x;
> [AX,H1,H2] = plotyy(x,y1,x,y2,'plot');
> set(get(AX(1),'Ylabel'),'String','Slow Decay')
> set(get(AX(2),'Ylabel'),'String','Fast Decay')
> set(AX(1),'FontSize',13)
> set(AX(2),'FontSize',13)

Hi

One solution is to make the axes use a smaller fraction of the space.

>> set(AX(2),'Outerposition',[0 0 1 1])
>> set(AX(1),'Outerposition',[0 0 1 1])

This might be a start to solving the problem

Ross
```
 0