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 // =============================================================================
7 // <-- TEST WITH GRAPHIC -->
8 // <-- Non-regression test for bug 10298 -->
10 // <-- Bugzilla URL -->
11 // http://bugzilla.scilab.org/show_bug.cgi?id=10298
13 // <-- Short Description -->
14 // Example of datatipSetDisplay generates an error
15 x=linspace(-1,1,1000);
17 plot(x,sinc(20*x),x,1-x^2);
19 d21=datatipCreate(e(2),600);
20 d22=datatipCreate(e(2),200);
21 d1=datatipCreate(e(1),700);
22 function str=mydisplay(curve, pt, index)
23 str=msprintf('sinc(%-0.2g)=%-0.2g', 20*pt(1),pt(2))
25 assert_checktrue(execstr("datatipSetDisplay(e(2),mydisplay)","errcatch")==0);