0

I am plotting some data in Scilab as 3d-Scatter plot (Scilab 6). With the datatip toggle it is able to show some information about each data point: x,y,z value. I am actually plotting node-values, x,y are the coordinates, z is the damage. Is it possible to change the output of the datatip? I would like to display a node-label instead of the coordinates using the datatip-function!

Thank you!

Sabine
  • 1
  • 1

2 Answers2

0

Use datatipSetDisplay (cf. examples in help page)

wozai
  • 1
  • Thank you, I tried it and it works fine when I create the datatips with datatipCreate(...) and change the representation afterwards. But is there a way to change the text of the datatips generally - so if I use the datatip-toggle in the figure window the new text including x,y,z and a label is shown? – Sabine May 03 '18 at 06:53
0

You can set a custom diplay function per "PolyLine" object in your plot, e.g.

t=0:0.1:10;y=sin(t);
function s=mydatatip(h),s="DATATIP",end
plot(t,y)
datatipSetDisplay(gca().children(1).children(1),mydatatip)

Please note, here gca().children(1).children(1) is a handle to the "PolyLine" object of the plot.

wozai
  • 1
  • 1