[Scilab-users] scilab crashes at empty p_datatips.data

Philipp Mühlmann p.muehlmann at gmail.com
Tue Mar 28 10:44:37 CEST 2017


Hallo,

playing along with the code example

see:
[Scilab-users] how to place datatip on one point of polyline

clc;clear();
function str=ShowTipsmyfmt(h)
 pt = h.data;
 str = 'where is the tip on the red curve?';
 endfunction


 //function TipIx= ShowTips()
 x1=linspace(0,1,32)';
 y1=sinc(10*x1);
 TipIx = round( length(y1) ./ 2 );
 y2=zeros(y1);
 y2(TipIx-1) = 1.*%nan;
 y2(TipIx+1) = 1.*%nan;
 y3=ones(y1) .* %nan ;
 y3( TipIx-1 : TipIx+1 ) = 0.4;
 clf();
 plot2d(x1,[y1,y2,y3], style=[color("black"), color("red"), color("blue")] );
 e=gce();
 p_blue=e.children(1);
 p_blue.mark_style=5;// diamond
 p_red=e.children(2);
 p_red.mark_style=1;// +
 p_red.thickness=2;
 p_red.mark_foreground=color("red");
 if TipIx ~= [] then
    t_red=datatipCreate(p_red, TipIx);
    datatipSetOrientation(t_red,"upper left")
    datatipSetDisplay(t_red,"ShowTipsmyfmt")
 end
 //endfunction
disp(p_red.datatips.data,'p_red');disp(p_blue.datatips.data,'p_blue');



in Scilab 5.5.1 I get:  "error21" which - I guess - is just fine.

in Scilab 6.0.0 I just can close Scilab and restart.


This done at a 64bit-Windows 7 PC, using
- Scilab 5.5.1 64bit version
- Scilab 6.0.0 64bit version

Why this different behaviour?

Thanks,
Philipp

-- 
In Kanada is' ka' na' da. Sonst wär' Kanada Jemanda.

There we have the salad.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20170328/4a22311f/attachment.htm>


More information about the users mailing list