[Scilab-users] Scilab 6's plot2d displays %nan on the horizontal line in the mid-range of vertical axis

classic Classic list List threaded Threaded
3 messages Options
Denis Crété Denis Crété
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Scilab 6's plot2d displays %nan on the horizontal line in the mid-range of vertical axis

Hello,

New in Scilab 6 (+Linux): If %nan values are in the Y vector, plot2d behaves as if the following was performed before display: Y (isnan(Y))=(YM + Ym)/2; where YM and Ym are max and min values of the Y-tics. It is probably not what one expects…

Denis

 

[@@ THALES GROUP INTERNAL @@]

 

Unité Mixte de Physique CNRS / THALES

1 Avenue Augustin Fresnel

91767 Palaiseau CEDEx - France

Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78

e-mail :

 [hidden email] <[hidden email]>

http://www.trt.thalesgroup.com/ump-cnrs-thales

http://www.research.thalesgroup.com

 


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Denis Crété
Christophe Dang Ngoc Chan Christophe Dang Ngoc Chan
Reply | Threaded
Open this post in threaded view
|

Re: {EXT} Scilab 6's plot2d displays %nan on the horizontal line in the mid-range of vertical axis

Hello Denis,

> De  CRETE Denis
> Envoyé : mercredi 17 mai 2017 14:20
>
> If %nan values are in the Y vector,
> plot2d behaves as if the following was performed before display:
> Y (isnan(Y))=(YM + Ym)/2

I'm not sure I understand what you're pointing out.

The following code works exactly as I expect:

----------

x = 1:5;

y=x.^2;

y(3)=%nan;

plot(x, y)

----------

i.e. the point at x=3 is simply missing,
with a blank between x=2 and x=4.

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Denis Crété Denis Crété
Reply | Threaded
Open this post in threaded view
|

Re: {EXT} Scilab 6's plot2d displays %nan on the horizontal line in the mid-range of vertical axis

Hello Christophe,
Thank you for trying also the function "plot" instead of "plot2d".
On Scilab 6, on a Linux platform, I have the same result for both functions = they both plot a number of points equal to size(x,'*'), with guessed values for Yk when Yk is %nan...
Code:
 X=1:5;
 Y=X.^2;
 Y(3)=%nan;
 plot(X',Y');
 plot2d(X',Y',style=3);
 // cf. figures; Parabole_nan.png is generated by "plot", and Parabole_2d_nan.png is generated by "plot2d".

I did not install Scilab 6 on Windows yet. When this is done, I'll give it a try.
Best regards
Denis
 
-----Message d'origine-----
De : users [mailto:[hidden email]] De la part de Dang Ngoc Chan, Christophe
Envoyé : mercredi 17 mai 2017 15:25
À : Users mailing list for Scilab
Objet : Re: [Scilab-users] {EXT} Scilab 6's plot2d displays %nan on the horizontal line in the mid-range of vertical axis

Hello Denis,

> De  CRETE Denis
> Envoyé : mercredi 17 mai 2017 14:20
>
> If %nan values are in the Y vector,
> plot2d behaves as if the following was performed before display:
> Y (isnan(Y))=(YM + Ym)/2

I'm not sure I understand what you're pointing out.

The following code works exactly as I expect:

----------

x = 1:5;

y=x.^2;

y(3)=%nan;

plot(x, y)

----------

i.e. the point at x=3 is simply missing, with a blank between x=2 and x=4.

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

Parabole-2d_nan.png (6K) Download Attachment
Parabole_nan.png (7K) Download Attachment
Denis Crété