Fix bug 4639
Pierre LANDO [Mon, 12 Oct 2009 09:49:54 +0000 (11:49 +0200)]
28 files changed:
scilab/modules/graphics/demos/2d_3d_plots/abaque.dem.sce
scilab/modules/graphics/demos/2d_3d_plots/plot3d.dem.sce
scilab/modules/graphics/demos/anim/anim.dem.gateway.sce
scilab/modules/graphics/demos/anim/anim8/anim8.sci
scilab/modules/graphics/demos/bezier/bezier3dtest.sce
scilab/modules/graphics/demos/bezier/beziersurftest.sce
scilab/modules/graphics/demos/bezier/beziertest.sce
scilab/modules/graphics/demos/bezier/c1test.sce
scilab/modules/graphics/demos/bezier/cltest.sce [deleted file]
scilab/modules/graphics/demos/bezier/gammatest.sce
scilab/modules/graphics/demos/cmplxfunc/demo_acos.dem.sce
scilab/modules/graphics/demos/cmplxfunc/demo_acosh.dem.sce
scilab/modules/graphics/demos/cmplxfunc/demo_asin.dem.sce
scilab/modules/graphics/demos/cmplxfunc/demo_asinh.dem.sce
scilab/modules/graphics/demos/cmplxfunc/demo_atan.dem.sce
scilab/modules/graphics/demos/cmplxfunc/demo_atanh.dem.sce
scilab/modules/graphics/demos/cmplxfunc/demo_cos.dem.sce
scilab/modules/graphics/demos/cmplxfunc/demo_cosh.dem.sce
scilab/modules/graphics/demos/cmplxfunc/demo_exp.dem.sce
scilab/modules/graphics/demos/cmplxfunc/demo_log.dem.sce
scilab/modules/graphics/demos/cmplxfunc/demo_sin.dem.sce
scilab/modules/graphics/demos/cmplxfunc/demo_sinh.dem.sce
scilab/modules/graphics/demos/cmplxfunc/demo_tan.dem.sce
scilab/modules/graphics/demos/cmplxfunc/demo_tanh.dem.sce
scilab/modules/graphics/demos/colormap.dem.sce
scilab/modules/graphics/demos/misc/misc.dem.sce
scilab/modules/graphics/demos/surface/cplxroot.sce
scilab/modules/graphics/macros/contourf.sci

index 04ef704..eeeaec2 100644 (file)
@@ -4,18 +4,12 @@
 //
 // This file is distributed under the same license as the Scilab package.
 //
-
 my_handle             = scf(100001);
 clf(my_handle,"reset");
-demo_viewCode("abaque.dem.sce");
-
 // DEMO START
-
 my_plot_desc          = "chart";
 my_handle.figure_name = my_plot_desc;
-
 chart();
 xtitle(my_plot_desc," "," "," ");
-
+demo_viewCode("abaque.dem.sce");
 // DEMO END
-
index b8e10a8..d8496ea 100644 (file)
@@ -4,17 +4,12 @@
 //
 // This file is distributed under the same license as the Scilab package.
 //
-
 my_handle             = scf(100001);
 clf(my_handle,"reset");
 demo_viewCode("plot3d.dem.sce");
-
 // DEMO START
-
 my_plot_desc          = "plot3d : z=sin(x)*cos(y)";
 my_handle.figure_name = my_plot_desc;
-
 plot3d();
 xtitle(my_plot_desc," "," "," ");
-
 // DEMO END
index c6c8f72..33167e9 100644 (file)
@@ -18,7 +18,7 @@ subdemolist=[ ..
        "Shell"                              ,"anim7/anim7_gateway.sce"];
 
 if ~ usecanvas() then
-       subdemolist = [ subdemolist ; "Rieman surface","anim8/anim8_gateway.sce" ];
+       subdemolist = [ subdemolist ; "Riemann surface","anim8/anim8_gateway.sce" ];
 end
 
 subdemolist(:,2) = demopath + subdemolist(:,2);
index 899f509..7204948 100644 (file)
@@ -19,6 +19,12 @@ function demo_riemann()
        // =========================================================================
        my_handle = scf(100001);
        clf(my_handle,"reset");
+
+       // Add "see code" menu item
+       // =========================================================================
+  f=mopen("SCI/modules/graphics/demos/anim/anim8/anim8.sci");
+  demo_viewCode("anim8.sci");
+  mclose(f);
        
        // Drawlater
        // =========================================================================
index 9efb87a..ba805eb 100644 (file)
@@ -18,4 +18,5 @@ function bezier3dtest ()
 endfunction
 
 bezier3dtest();
+demo_viewCode("bezier3dtest.sce");
 clear bezier3dtest;
index 326e017..fd73c02 100644 (file)
@@ -29,4 +29,5 @@ function beziersurftest
 endfunction
 
 beziersurftest();
+demo_viewCode("beziersurftest.sce");
 clear beziersurftest;
index 89a1b7e..d67a78b 100644 (file)
@@ -25,4 +25,5 @@ function beziertest
 endfunction
 
 beziertest();
+demo_viewCode("beziertest.sce");
 clear beziertest;
index 37c9bbf..e9d07ec 100644 (file)
@@ -56,4 +56,5 @@ function c1test
 endfunction
 
 c1test();
+demo_viewCode("c1test.sce");
 clear c1test;
diff --git a/scilab/modules/graphics/demos/bezier/cltest.sce b/scilab/modules/graphics/demos/bezier/cltest.sce
deleted file mode 100644 (file)
index 3c73aac..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-//
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) INRIA
-//
-// This file is distributed under the same license as the Scilab package.
-//
-
-// Show how two bezier surfaces can be joined.
-
-function c1test
-
-       // first surface
-       x1=dup(-0.5:0.25:0.5,5);
-       y1=dup([0,0,0,0,1],5);
-       z1=dup(2:0.25:3,5)';
-       [xb1,yb1,zb1]=beziersurface(x1,y1,z1,10);
-
-       // second surface
-       x2=dup(-0.5:0.25:0.5,5);
-       y2=[(ones(4,5));[0,0,0,0,0]];
-       z2=-dup(-1:0.25:0,5)'
-       [xb2,yb2,zb2]=beziersurface(x2,y2,z2,10);
-
-       // a surface to link the two previous ones
-       x=zeros(5,5); y=x; z=x;
-       x(1,:)=x1(1,:); x(2,:)=x(1,:)-(x1(2,:)-x1(1,:));
-       x(5,:)=x2(1,:); x(4,:)=x(5,:)-(x2(2,:)-x2(1,:));
-       x(3,:)=(x(4,:)+x(2,:))/2;
-       y(1,:)=y1(1,:); y(2,:)=y(1,:)-(y1(2,:)-y1(1,:));
-       y(5,:)=y2(1,:); y(4,:)=y(5,:)-(y2(2,:)-y2(1,:));
-       y(3,:)=(y(4,:)+y(2,:))/2;
-       z(1,:)=z1(1,:); z(2,:)=z(1,:)-(z1(2,:)-z1(1,:));
-       z(5,:)=z2(1,:); z(4,:)=z(5,:)-(z2(2,:)-z2(1,:));
-       z(3,:)=(z(4,:)+z(2,:))/2;
-       A=35,T=50,L="" "",EB=[4,2,0];
-       [xb,yb,zb]=beziersurface(x,y,z,10);
-       
-       //drawing
-       my_handle = scf(100001);
-       clf(my_handle,"reset");
-       my_current_axis = gca();
-       drawlater();
-       subplot(2,1,1);
-       title("how two bezier surfaces can be joined","fontsize",3);
-       subplot(2,2,1);
-       plot3d2(xb1,yb1,zb1,-1,A,T,L,EB);
-       subplot(2,2,3);
-       plot3d2(xb2,yb2,zb2,-1,A,T,L,EB);
-       subplot(1,2,2);
-       [n1,p1]=size(xb1);
-       [n2,p2]=size(xb);
-       plot3d2([xb1;xb;xb2],[yb1;yb;yb2],[zb1;zb;zb2],-1,A,T,L,EB);
-       delete(my_current_axis);
-       drawnow();
-endfunction
-
-c1test();
-clear c1test;
index 53112d5..7971337 100644 (file)
@@ -37,4 +37,5 @@ function gammatest (N)
 endfunction
 
 gammatest();
+demo_viewCode("gammatest.sce");
 clear gammatest;
index b18011b..c511b6a 100644 (file)
@@ -16,11 +16,11 @@ function demo_acos()
        
        my_handle = scf(100001);
        clf(my_handle,"reset");
-       demo_viewCode("demo_acos.dem.sce");
        
        PlotCmplxFunc(2,%eps,"Square","Ox",41,"acos",theta,alpha,[-1,1]);
        
 endfunction
 
 demo_acos()
+demo_viewCode("demo_acos.dem.sce");
 clear demo_acos;
index df0a537..8d19774 100644 (file)
@@ -18,11 +18,11 @@ function demo_acosh()
        
        my_handle = scf(100001);
        clf(my_handle,"reset");
-       demo_viewCode("demo_acosh.dem.sce");
        
        PlotCmplxFunc(R,e,"Square","Ox",41,"acosh",theta,alpha,[1,R]);
        
 endfunction
 
 demo_acosh()
+demo_viewCode("demo_acosh.dem.sce");
 clear demo_acosh;
index f7a8d29..6fec387 100644 (file)
@@ -16,11 +16,11 @@ function demo_asin()
        
        my_handle = scf(100001);
        clf(my_handle,"reset");
-       demo_viewCode("demo_asin.dem.sce");
        
        PlotCmplxFunc(2,%eps,"Square","Ox",41,"asin",theta,alpha,[-1,1]);
        
 endfunction
 
 demo_asin()
+demo_viewCode("demo_asin.dem.sce");
 clear demo_asin;
index d7317e2..599ca49 100644 (file)
@@ -18,11 +18,11 @@ function demo_asinh()
        
        my_handle = scf(100001);
        clf(my_handle,"reset");
-       demo_viewCode("demo_asinh.dem.sce");
        
        PlotCmplxFunc(R,e,"Square","Oy",41,"asinh",theta,alpha,[-R,R]);
        
 endfunction
 
 demo_asinh()
+demo_viewCode("demo_asinh.dem.sce");
 clear demo_asinh;
index 544a93d..0aa60c9 100644 (file)
@@ -17,11 +17,11 @@ function demo_atan()
        
        my_handle = scf(100001);
        clf(my_handle,"reset");
-       demo_viewCode("demo_atan.dem.sce");
        
        PlotCmplxFunc(R,0.001,"Square","Oy",41,"atan",theta,alpha,[-R,R]);
        
 endfunction
 
 demo_atan()
+demo_viewCode("demo_atan.dem.sce");
 clear demo_atan;
index 7b76eaf..734039d 100644 (file)
@@ -18,11 +18,11 @@ function demo_atanh()
        
        my_handle = scf(100001);
        clf(my_handle,"reset");
-       demo_viewCode("demo_atanh.dem.sce");
        
        PlotCmplxFunc(R,e,"Square","Ox",41,"atanh",theta,alpha,[-0.99,0.99]);
        
 endfunction
 
 demo_atanh()
+demo_viewCode("demo_atanh.dem.sce");
 clear demo_atanh;
index 556cdc1..f74d3fb 100644 (file)
@@ -17,11 +17,11 @@ function demo_cos()
        
        my_handle = scf(100001);
        clf(my_handle,"reset");
-       demo_viewCode("demo_cos.dem.sce");
        
        PlotCmplxFunc(R,0,"Disk","Ox",[40 20],"cos",theta,alpha,[-R,R]);
        
 endfunction
 
 demo_cos()
+demo_viewCode("demo_cos.dem.sce");
 clear demo_cos;
index 55af183..656d31e 100644 (file)
@@ -18,11 +18,11 @@ function demo_cosh()
        
        my_handle = scf(100001);
        clf(my_handle,"reset");
-       demo_viewCode("demo_cosh.dem.sce");
        
        PlotCmplxFunc(R,e,"Disk","Ox",[40 20],"cosh",theta,alpha,[-R,R]);
        
 endfunction
 
 demo_cosh()
+demo_viewCode("demo_cosh.dem.sce");
 clear demo_cosh;
index efe0a97..5cb7743 100644 (file)
@@ -17,11 +17,11 @@ function demo_exp()
        
        my_handle = scf(100001);
        clf(my_handle,"reset");
-       demo_viewCode("demo_exp.dem.sce");
        
        PlotCmplxFunc(R,0,"Disk","Ox",[40 20],"exp",theta,alpha,[-R,R]);
        
 endfunction
 
 demo_exp()
+demo_viewCode("demo_exp.dem.sce");
 clear demo_exp;
index 3803d15..b8cf082 100644 (file)
@@ -18,11 +18,11 @@ function demo_log()
        
        my_handle = scf(100001);
        clf(my_handle,"reset");
-       demo_viewCode("demo_log.dem.sce");
        
        PlotCmplxFunc(R,e,"Disk","Ox",[40 20],"log",theta,alpha,[e,R]);
        
 endfunction
 
 demo_log()
+demo_viewCode("demo_log.dem.sce");
 clear demo_log;
index 457d409..5c5a2bf 100644 (file)
@@ -18,11 +18,11 @@ function demo_sin()
        
        my_handle = scf(100001);
        clf(my_handle,"reset");
-       demo_viewCode("demo_sin.dem.sce");
        
        PlotCmplxFunc(R,e,"Disk","Ox",[40 20],"sin",theta,alpha,[-R,R]);
        
 endfunction
 
 demo_sin()
+demo_viewCode("demo_sin.dem.sce");
 clear demo_sin;
index 3c10328..ddcf045 100644 (file)
@@ -18,11 +18,11 @@ function demo_sinh()
        
        my_handle = scf(100001);
        clf(my_handle,"reset");
-       demo_viewCode("demo_sinh.dem.sce");
        
        PlotCmplxFunc(R,0,"Disk","Ox",[40 20],"sinh",theta,alpha,[-R,R]);
        
 endfunction
 
 demo_sinh()
+demo_viewCode("demo_sinh.dem.sce");
 clear demo_sinh;
index 3771cfd..e552b1d 100644 (file)
@@ -17,11 +17,11 @@ function demo_tan()
        
        my_handle = scf(100001);
        clf(my_handle,"reset");
-       demo_viewCode("demo_tan.dem.sce");
        
        PlotCmplxFunc(R,0,"Square","Ox",41,"tan",theta,alpha,[-R,R]);
        
 endfunction
 
 demo_tan()
+demo_viewCode("demo_tan.dem.sce");
 clear demo_tan;
index 1d031b2..dbf28d1 100644 (file)
@@ -18,11 +18,11 @@ function demo_tanh()
        
        my_handle = scf(100001);
        clf(my_handle,"reset");
-       demo_viewCode("demo_tanh.dem.sce");
        
        PlotCmplxFunc(R,e,"Square","Ox",41,"tanh",theta,alpha,[-R,R]);
        
 endfunction
 
 demo_tanh()
+demo_viewCode("demo_tanh.dem.sce");
 clear demo_tanh;
index 6b43f80..1fe8095 100644 (file)
@@ -10,5 +10,9 @@
 //
 
 my_path = SCI+"/modules/graphics/demos";
+funcprot(0);
 exec(my_path+"/colormap.dem.sci");
 demo_colormap();
+f=mopen(my_path+"/colormap.dem.sci");
+demo_viewCode("colormap.dem.sci");
+mclose(f);
index e62768b..d2af806 100644 (file)
@@ -10,5 +10,9 @@
 //
 
 my_path = SCI+"/modules/graphics/demos/misc";
-funcprot(0);exec(my_path+"/misc.dem.sci");funcprot(1);
+funcprot(0);
+exec(my_path+"/misc.dem.sci");funcprot(1);
 demo_misc();
+f=mopen(my_path+"/misc.dem.sci");
+demo_viewCode("misc.dem.sci");
+mclose(f);
index 0a8d654..043969a 100644 (file)
@@ -8,3 +8,4 @@
        my_handle = scf(100001);
        clf(my_handle,"reset");
        cplxroot(2,20,130,45);
+  demo_viewCode("cplxroot.sce");
index 8cdc307..831617f 100644 (file)
@@ -88,7 +88,7 @@ plot2d([mini(xx);maxi(xx)],[mini(yy);maxi(yy)],0,strf,leg,rect,nax);
 
 draw_min=1;
 H=[];
-[FA,IA]=sort(abs(Area));
+[FA,IA]=gsort(abs(Area));
 
   drawlater(); // postpon the drawing here
   a=gca();