[scilab-Users] Drawing Y-axis in graph

Prof. Dr. Reinaldo Golmia Dante tiraduvidascefet at yahoo.com
Sat Jun 25 21:31:16 CEST 2011


I found a way but it is still unsolved completely.
 
Check it:function f=funcao(x) f = 2*x*exp(-x^2); endfunction x_inicial = -4 x_final = 4 n = 100; 
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) 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='r',tics='v'); // I try to do the same, but Y-axis does not display  :-((( drawaxis(y=y_inicial:y_final,x=0,dir='r',tics='v'); legend ( "2*x*exp(-x^2)" );
If you see the Y-axis goes from the minimum point (image of function) to 0.1. That's the problem. It should go
to maximum point of function image (= y_final).
 
Why does it not go to y_final value ? :-((
 
I write that script because I can ajust the low and high bound of Y_axis according to the given function.
 
I appreaciate your comments.
 
All best,
Reinaldo.
 From: Sumit Adhikari <sumit.adhikari at gmail.com>
To: users at lists.scilab.org
Sent: Saturday, June 25, 2011 4:24 PM
Subject: Re: [scilab-Users] Drawing Y-axis in graph



Sorry for understanding the problem wrongly!

Although, I have never used such kind of plots, but from the document what appears is that your script is correct.

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:18 PM, Prof. Dr. Reinaldo Golmia Dante <tiraduvidascefet at yahoo.com> wrote:

I have Scilab 5.3 ...
>Why ? 
>If you see your graph, when the function crosses zero, it doesn't appear Y-axis at x = 0. 
> 
> 
> 
> 
> 
>From: Sumit Adhikari <sumit.adhikari at gmail.com>
>To: users at lists.scilab.org
>Sent: Saturday, June 25, 2011 4:13 PM
>
>Subject: Re: [scilab-Users] Drawing Y-axis in graph
>
>
>Seems a good time for you to migrate to newer versions of 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 9:09 PM, Sumit Adhikari <sumit.adhikari at gmail.com> wrote:
>
>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/20110625/82ff1336/attachment.htm>


More information about the users mailing list