[Scilab-users] Cropped labels after image export

Tim Wescott tim at wescottdesign.com
Wed Jan 28 18:17:38 CET 2015


You can also fine-tune things by changing the margin size:

g = gcf();

look at 

g.children.margins

On Wed, 2015-01-28 at 16:43 +0100, Sophie von Borstel wrote:
> Yes that works
> Thank you!
>   
> Gesendet: Mittwoch, 28. Januar 2015 um 16:33 Uhr
> Von: "Calixte Denizet" <calixte.denizet at scilab-enterprises.com>
> An: users at lists.scilab.org
> Betreff: Re: [Scilab-users] Cropped labels after image export
> Hi Sophie,
> 
> You should set the fontsize for axes ticks before to set the labels:
>   
> x=1:100;
> y=sin(x);
>  
> figure;
> g = gcf();
>   
> axh = g.children;
> axh.font_size = 6;
>   
> plot(x,y)
> xlabel('Blablabla1','fontsize',6);
> ylabel('Blablabla2','fontsize',6);
>  
> g.children.children(1).children.thickness = 2; //Plot Thickness
> g.children.children.children.thickness = 2;
>   
> xs2eps(g, 'Blub.eps', ['landscape']);
> 
> Regards,
> 
> Calixte
> 
> On 28/01/2015 16:19, Sophie von Borstel wrote:
>         Hi smart people;
>          
>         I am using Scilab 5.5.0 for getting some beautiful graphics.
>         Unfortunately I have a problem with exporting figures.
>         After changing axis font size the labels are out of view.
>         See my code below.
>          
>         If I change the window size by hand I can find my labels
>         again.
>          
>          
>         Is there another method for doing this?
>         I just don’t want to change each graphic by hand.
>          
>         Thanks in advance for your help! 
>         Sophie
>          
>          
>          
>         x=1:100;
>         y=sin(x);
>          
>         figure;
>         g = gcf();
>         plot(x,y)
>          
>         xlabel('Blablabla1','fontsize',6);
>         ylabel('Blablabla2','fontsize',6);
>          
>         g.children.children(1).children.thickness = 2; //Plot
>         Thickness
>          
>         g.children.children.children.thickness = 2;
>         axh = g.children;
>         axh.font_size = 6;
>          
>         xs2eps(g, 'Blub.eps', ['landscape']);
>          
>               
>         _______________________________________________
>         users mailing list
>         users at lists.scilab.org
>         http://lists.scilab.org/mailman/listinfo/users
>   
> -- 
> Calixte Denizet
> Software Development Engineer
> -----------------------------------------------------------
> Scilab Enterprises
> 143bis rue Yves Le Coz - 78000 Versailles, France
> http://www.scilab-enterprises.com
> _______________________________________________ users mailing list
> users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

-- 

Tim Wescott
www.wescottdesign.com
Control & Communications systems, circuit & software design.
Phone: 503.631.7815
Cell:  503.349.8432




More information about the users mailing list