[scilab-Users] Drawing Y-axis in graph

Prof. Dr. Reinaldo Golmia Dante tiraduvidascefet at yahoo.com
Sat Jul 2 14:39:10 CEST 2011


Hi Samuel, 
And how can I do to keep the title "Y-axis on the left" and  the title "X-axis bellow" ?  
Run the code: function f=funcao(x) f = x*sin(x); endfunction x_inicial = -10; x_final = 10; n = 100; // number of points xdata = linspace ( x_inicial , x_final, n); for i = 1:n f1(i) = funcao(xdata(i)); end y_inicial = min(f1); y_final = max(f1); plot (xdata, funcao) xgrid(color("grey")) xtitle ( "Função" , "X axis " , "Y axis " ); a=gca(); a.y_location="middle"; // Here X-axis displays in the centre of graph  b=gca(); b.x_location="middle"; // Here Y-axis displays in the centre of graph //drawaxis(x=x_inicial:x_final,y=0,dir='d',tics='v'); //Here X-axis displays //drawaxis(y=-6:0.5:8,x=0,dir='r',tics='v',sub_int=2); //drawaxis(y=y_inicial:y_final,x=0,dir='r',tics='v'); // Here Y-axis displays legend ( "x sin(x)" );
Thank you.
Reinaldo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110702/119c5879/attachment.htm>


More information about the users mailing list