[Scilab-users] A question about plotting

Paul Bignier paul.bignier at scilab-enterprises.com
Mon Aug 18 08:53:03 CEST 2014


Hello,

When you type ' plot(X,Y) ', Scilab links together the consecutive 
[X(i),Y(i)] pairs.
In your example, X(40)~6.28 and X(41)=0.
So [X(40), Y(40)] is connected to [X(41), Y(41)], and the "additional 
line" represents that simple connection.

' plot(x,y1,x,y2); ' considers [x, y1] and [x, y2] as two distinct 
curves, so they are not linked together.

Hope this helps,
Regards,
Paul



On 08/18/2014 04:15 AM, ?? wrote:
>
> Hi , All:
>
> I have a question about plotting.
>
> I want to plot 2 lines in a graphic , so I type the command as below:
>
> -->x=linspace(0,2*%pi,40);
>
> -->y1=sin(x)
>
> -->y2=cos(x);
>
> -->X=[x,x];
>
> -->Y=[y1,y2];
>
> Then , I type the plot command :
>
> -->plot(x,y1,x,y2);
>
> The result is shown as below:
>
> Graphic window number 0 (2).bmp
>
> But when I type a command as below:
>
> -->plot(X,Y);
>
> The result is :
>
> Graphic window number 0.bmp
>
> It  has an additional line.
>
> Why will this line appear?
>
> Thanks for your reply.
>
>
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

-- 
Paul BIGNIER
Development engineer
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
Phone: +33.1.80.77.04.69
http://www.scilab-enterprises.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20140818/59328ba9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 13383 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20140818/59328ba9/attachment.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 11917 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20140818/59328ba9/attachment-0001.jpe>


More information about the users mailing list