<div dir="ltr"><div><div><div><div><div>t_red=datatipCreate(p_blue, TipIx);<br><br></div>shouldn't it be<br><br>t_red=datatipCreate(p_red, TipIx);<br><br>??<br><br><br></div><br></div></div></div><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-27 11:59 GMT+02:00 Erhy <span dir="ltr"><<a href="mailto:erhard.glueck.austria@gmail.com" target="_blank">erhard.glueck.austria@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
If I plot curves where some values are %nan<br>
datatips are not shown if the curve point for the tip is surrounded by %nan<br>
values.<br>
Now I code on Version 6.0.0<br>
<<a href="http://mailinglists.scilab.org/file/n4036034/datatipbsp.png" rel="noreferrer" target="_blank">http://mailinglists.scilab.<wbr>org/file/n4036034/datatipbsp.<wbr>png</a>><br>
My code:<br>
function str=ShowTipsmyfmt(h)<br>
pt = h.data;<br>
str = 'where is the tip on the red curve?';<br>
endfunction<br>
function TipIx= ShowTips()<br>
x1=linspace(0,1,32)';<br>
y1=sinc(10*x1);<br>
TipIx = round( length(y1) ./ 2 );<br>
y2=zeros(y1);<br>
y2(TipIx-1) = %nan;<br>
y2(TipIx+1) = %nan;<br>
y3=ones(y1) .* %nan ;<br>
y3( TipIx-1 : TipIx+1 ) = 0.4;<br>
clf();<br>
plot2d(x1,[y1,y2,y3], style=[color("black"), color("red"), color("blue")] );<br>
e=gce();<br>
p_blue=e.children(1);<br>
p_blue.mark_style=5;// diamond<br>
p_red=e.children(2);<br>
p_red.mark_style=1;// +<br>
p_red.thickness=2;<br>
p_red.mark_foreground=color("<wbr>red");<br>
if TipIx ~= [] then<br>
t_red=datatipCreate(p_blue, TipIx);<br>
datatipSetOrientation(t_red,"<wbr>upper left")<br>
datatipSetDisplay(t_red,"<wbr>ShowTipsmyfmt")<br>
<br>
t_blue=datatipCreate(p_blue, TipIx);<br>
t_blue.font_foreground=color("<wbr>blue");<br>
t_blue.font_size=3;<br>
datatipSetOrientation(t_blue,"<wbr>upper left")<br>
datatipSetDisplay(t_blue,"<wbr>ShowTipsmyfmt")<br>
end<br>
endfunction<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://mailinglists.scilab.org/how-to-place-datatip-on-one-point-of-polyline-tp4036034.html" rel="noreferrer" target="_blank">http://mailinglists.scilab.<wbr>org/how-to-place-datatip-on-<wbr>one-point-of-polyline-<wbr>tp4036034.html</a><br>
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.<br>
______________________________<wbr>_________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.scilab.org/<wbr>mailman/listinfo/users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>In Kanada is' ka' na' da. Sonst wär' Kanada Jemanda.</div><div><br></div><div>There we have the salad.</div></div></div>
</div>