[Scilab-users] Plotting as stem function

Serge Steer Serge.Steer at inria.fr
Sat Feb 20 11:19:28 CET 2016


Le 20/02/2016 03:07, Chema a écrit :
> Hi,
>
> I have a problem when I'm trying to plot as in "stem" function in matlab
> using plot2d3, my scilab code is:
>
> n=0:20;
> x=cos(2*%pi*4.*n);
> plot2d3(n,x)
>
> tha plot shows some values in 0, why if the vector x is all ones?
>
> <http://mailinglists.scilab.org/file/n4033516/img_scilab.jpg>

Which Scilab version do you use?
I have tried your code on Scilab-5.5.2 and it gives good result.

The y axis of your plot ranges from 1 to 1, so if a value is slightly less than 1 (due to rounding errors) the bar dispears

You can fix the problem changing the y axis limits
ax=gca();
ax.data_bounds(1,2)=0;

>
>
>
> --
> View this message in context: http://mailinglists.scilab.org/Plotting-as-stem-function-tp4033516.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>




More information about the users mailing list