[scilab-Users] Drawing Y-axis in graph

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


Hi again,
 
For example: in the following Scilab code, how could I move the Y-axis to the centre of graph ?
 function f=funcao(x) f = 1/x; endfunction x_inicial = -1; x_final = 1; 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 " ); drawaxis(x=x_inicial:0.5:x_final,y=0,dir='d',tics='v'); //Here X-axis displays legend ( "y = 1/x" );
 
Thank you in advance.
 
All best,
Reinaldo.
 
 
----- Forwarded Message -----
From: Sumit Adhikari <sumit.adhikari at gmail.com>
To: users at lists.scilab.org
Sent: Saturday, June 25, 2011 4:09 PM
Subject: Re: [scilab-Users] Drawing Y-axis in graph


That is what I see! Please check the attached pdf file for what I see
Regards,


-- 
Sumit Adhikari,
Institute of Computer Technology,
Faculty of Electrical Engineering,
Vienna University of Technology,
Gußhausstraße 27-29,1040 Vienna




On Sat, Jun 25, 2011 at 9:04 PM, Prof. Dr. Reinaldo Golmia Dante <tiraduvidascefet at yahoo.com> wrote:

Hi Sumit, 
> 
>Do you see Y-axis at x = 0 ?
> 
>I don't see it ... 
> 
>Regards,
>Reinaldo.
> 
>From: Sumit Adhikari <sumit.adhikari at gmail.com>
>To: users at lists.scilab.org
>Sent: Saturday, June 25, 2011 3:18 PM
>Subject: Re: [scilab-Users] Drawing Y-axis in graph
>
>
>
>But I see Y-axis in your plot on my scilab!
>
>
>Regards,
>-- 
>Sumit Adhikari,
>Institute of Computer Technology,
>Faculty of Electrical Engineering,
>Vienna University of Technology,
>Gußhausstraße 27-29,1040 Vienna
>
>
>
>
>On Sat, Jun 25, 2011 at 8:01 PM, Prof. Dr. Reinaldo Golmia Dante <tiraduvidascefet at yahoo.com> wrote:
>
>Dear Scilab users,
>> 
>>I would like to draw Y-axis in a graph, but it does not display ! 
>> 
>>See the Scilab-codes:
>> function f=funcao(x) f = 2*x*exp(-x^2); endfunction x_inicial = -4 x_final = 4 xdata = linspace ( x_inicial , x_final, 100); y_inicial = -1.0; y_final = 1.0; plot (xdata, funcao) xtitle ( "Função" , "X axis " , "Y axis " ); drawaxis(x=x_inicial:x_final,y=0,dir='d',tics='v'); //Here X-axis displays drawaxis(y=y_inicial:y_final,x=0,dir='d',tics='v'); // I try to do the same, but Y-axis does not display  :-((( legend ( "2*x*exp(-x^2)" ); I appreciate your comments.
>>Thank you in advance. 
>>All best,
>>Reinaldo. 
>
>
> 
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110702/af5841e9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graph.png
Type: image/png
Size: 8084 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20110702/af5841e9/attachment.png>


More information about the users mailing list