[Scilab-users] bode plot

Paul Bignier paul.bignier at scilab-enterprises.com
Wed Jun 11 10:02:13 CEST 2014


Hi Raghu,

You need to retrieve the axes of the second plot thanks to the children 
of gcf().

Here is how I did it, based on your snippet:

function set_gr_txt(fnt_sz)
     // sets textize in plots to larger (4)
//    [out, inp] = argn(0);
//    //if inp < 1 then, x = 1, end //set default font size to 1

     f = gcf();

     a1 = f.children(1);
     if ~exists("fnt_sz","local") then // default size
         fnt_sz = 4;
     end
     a1.font_size = 4; // axis font size
     x_label=a1.x_label;
     x_label.font_size=fnt_sz;
     y_label=a1.y_label;
     y_label.font_size=fnt_sz;
     t = a1.title;
     t.font_size=fnt_sz;
     //disp(is_handle_valid(a1),typeof(h),'typeof handle');

     a2 = f.children(2);
     if ~exists("fnt_sz","local") then // default size
         fnt_sz = 4;
     end
     a2.font_size = 4; // axis font size
     x_label=a2.x_label;
     x_label.font_size=fnt_sz;
     y_label=a2.y_label;
     y_label.font_size=fnt_sz;
     t = a2.title;
     t.font_size=fnt_sz;
     //disp(is_handle_valid(a2),typeof(h),'typeof handle');

endfunction

// Execution:
bode()
set_gr_txt(4)

Regards,
Paul


On 06/11/2014 08:17 AM, Raghu Char wrote:
> List,
>
> I'd like to increase the font size of the bode plot( jpeg attached), i 
> have a function to do this
> but as there are 2 figures it  works only on 1, could not find any 
> help on this,  how do i do this?
>
>
> code snippet:
> function  y=set_gr_txt(fnt_sz)
>      // sets textize in plots to larger (4)
> //    [out, inp] = argn(0);
> //    //if inp<  1 then, x = 1, end //set default font size to 1
>     
>      a  =  gca();
>      if  ~exists("fnt_sz","local")  then  // default size
>          fnt_sz  =  4;
>      end
>     
>      a.font_size  =  4;  // axis font size
>      x_label=a.x_label;
>      x_label.font_size=fnt_sz;
>      y_label=a.y_label;
>      y_label.font_size=fnt_sz;
>      t  =  a.title;
>      t.font_size=fnt_sz;
>      //disp(is_handle_valid(a),typeof(h),'typeof handle');
>      
>     
> endfunction
>
> thanx in advance.
>
>
> -- 
> Regards raghu
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

-- 
Paul BIGNIER
Development engineer
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
Phone: +33.1.80.77.04.69
http://www.scilab-enterprises.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20140611/8926ae9f/attachment.htm>


More information about the users mailing list