[scilab-Users] Drawing Y-axis in graph
Prof. Dr. Reinaldo Golmia Dante
tiraduvidascefet at yahoo.com
Sat Jun 25 22:22:25 CEST 2011
wow .. good suggestion !!
Samuel,
do you know why the Y-axis at x = 0 doesn't cover the range (y_inicial, y_final) ?
If you run the following scrip you will see that the Y-axis goes until 0.1 ! I have no idea !
function f=funcao(x) f = 2*x*exp(-x^2); endfunction x_inicial = -4; x_final = 4; 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) 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'); // Here Y-axis displays legend ( "2*x*exp(-x^2)" );
Tnx
Reinaldo.
From: Samuel GOUGEON <Samuel.Gougeon at univ-lemans.fr>
To: users at lists.scilab.org
Sent: Saturday, June 25, 2011 4:39 PM
Subject: Re: [scilab-Users] Drawing Y-axis in graph
----- Message d'origine -----
De : Prof. Dr. Reinaldo Golmia Dante
Date : 25/06/2011 21:33:
I would like to have both.
>
>Some students have difficult to understand graphs using only Y-axis on the corner. For that reason,
>it is interesting to have Y-axis at x = 0.
But you can also use grids instead:
xgrid(color("grey"))
This may be clear enough for students
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110625/f20ad893/attachment.htm>
More information about the users
mailing list