1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2011 - INRIA - Serge Steer
5 // This file is distributed under the same license as the Scilab package.
6 // =============================================================================
8 // <-- TEST WITH GRAPHIC -->
10 // <-- Non-regression test for bug 10298 -->
12 // <-- Bugzilla URL -->
13 // http://bugzilla.scilab.org/show_bug.cgi?id=10298
15 // <-- Short Description -->
16 // Example of datatipSetDisplay generates an error
18 x=linspace(-1,1,1000);
20 plot(x,sinc(20*x),x,1-x^2);
22 d21=datatipCreate(e(2),600);
23 d22=datatipCreate(e(2),200);
24 d1=datatipCreate(e(1),700);
26 function str=mydisplay(curve, pt, index)
27 str=msprintf('sinc(%-0.2g)=%-0.2g', 20*pt(1),pt(2))
29 assert_checktrue(execstr("datatipSetDisplay(e(2),mydisplay)","errcatch")==0);