From 87bfb7631b05344411e4f0950f279f62b82a0f6c Mon Sep 17 00:00:00 2001 From: Bruno JOFRET Date: Fri, 28 Mar 2014 18:22:57 +0100 Subject: [PATCH] Update geom3d demo to use datatip Change-Id: Ifa4535300556f7957d5e4f62158c8e80209f3e55 --- .../graphics/demos/2d_3d_plots/geom3d.dem.sce | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scilab/modules/graphics/demos/2d_3d_plots/geom3d.dem.sce b/scilab/modules/graphics/demos/2d_3d_plots/geom3d.dem.sce index 34d4794..2da47e0 100644 --- a/scilab/modules/graphics/demos/2d_3d_plots/geom3d.dem.sce +++ b/scilab/modules/graphics/demos/2d_3d_plots/geom3d.dem.sce @@ -40,10 +40,18 @@ function demo_geom3d() current_axe.rotation_angles = [70,47]; current_axe.background = BackgroundColorId; - // A second 2d graphics' - [x1,y1] = geom3d([0,0],[0,0],[5,0]); - xsegs(x1,y1); - xstring(x1(1),y1(1),"The point (0,0,0)"); + // Add special point for datatip + param3d(0, 0, 0); + e = gce(); + dt = datatipCreate(e, 0); + function str=mydisplay(h) + pt = h.data; + str = msprintf('The point\n (%0.2g,%0.2g,%0.2g)', pt(1), pt(2), pt(3)) + endfunction + datatipSetDisplay(dt,"mydisplay") + + a = gca(); + a.rotation_angles = [75, 225]; xtitle(my_plot_desc," "," "," "); -- 1.7.9.5