bug 11481 : Draw the title axes behind. 06/8306/2
Cedric Delamarre [Wed, 25 Jul 2012 08:22:08 +0000 (10:22 +0200)]
Change-Id: I3e2e44a4825e04c59de8bddaa4ecd2890df1b011

scilab/CHANGES_5.4.X
scilab/modules/graphics/demos/cmplxfunc/MacCmplx.sci
scilab/modules/graphics/demos/cmplxfunc/demo_custom.dem.sce

index 30c3888..5d2b9c2 100644 (file)
@@ -207,6 +207,8 @@ Bug Fixes
 * Bug #11469 fixed - The drawing, using xfpolys, was incremental instead of draw
                      at the end of the update.
 
+* Bug #11481 fixed - The title axes was in front of plots.
+
 * Bug #11482 fixed - The 2 plots of demo "Graphics/Complex elementary function/Custom"
                      were too small.
 
index 66a9226..cc6e40c 100644 (file)
@@ -87,34 +87,6 @@ function []=PlotCmplxFunc(R,e,TypeDomain,TypeCut,n,StrFunc,theta,alpha,DomReal)
 
     drawlater();
 
-    // plot Im(z)
-    // ============================================
-
-    subplot(1,2,1);
-    plot3d(xi,yi,zi,theta,alpha,"Re(z)@Im(z)@",[2 6 4]);
-    xtitle("Im("+StrFunc+"(z))");
-
-    // plot Re(z) + the real restriction
-    // ============================================
-
-    subplot(1,2,2);
-    plot3d(xr,yr,zr,theta,alpha,"Re(z)@Im(z)@",[ 2 6 4]);
-    xtitle("Re("+StrFunc+"(z))");
-
-    // real function in yellow
-    // ============================================
-
-    if DomReal(2) > DomReal(1) then
-        //xstring(0.1,-0.15," In yellow : the real "+StrFunc+" function")
-        xx = linspace(DomReal(1),DomReal(2),40)';
-        yy = zeros(xx);
-        zz = evstr(StrFunc+"(xx)");
-        param3d1(xx,yy,list(zz,32),theta,alpha,flag=[0,0]);
-        yellow_line = get('hdl');
-        yellow_line.thickness = 3;
-        captions(yellow_line, "the real "+StrFunc+" function", "lower_caption");
-    end
-
     // Title
     // ============================================
 
@@ -145,6 +117,36 @@ function []=PlotCmplxFunc(R,e,TypeDomain,TypeCut,n,StrFunc,theta,alpha,DomReal)
     my_title_axes.title.font_size  = 3;
     my_title_axes.title.font_style = 2;
 
+    // plot Im(z)
+    // ============================================
+
+    subplot(1,2,1);
+    plot3d(xi,yi,zi,theta,alpha,"Re(z)@Im(z)@",[2 6 4]);
+    xtitle("Im("+StrFunc+"(z))");
+
+    // plot Re(z) + the real restriction
+    // ============================================
+
+    subplot(1,2,2);
+    plot3d(xr,yr,zr,theta,alpha,"Re(z)@Im(z)@",[ 2 6 4]);
+    xtitle("Re("+StrFunc+"(z))");
+
+    // real function in yellow
+    // ============================================
+
+    if DomReal(2) > DomReal(1) then
+        //xstring(0.1,-0.15," In yellow : the real "+StrFunc+" function")
+        xx = linspace(DomReal(1),DomReal(2),40)';
+        yy = zeros(xx);
+        zz = evstr(StrFunc+"(xx)");
+        param3d1(xx,yy,list(zz,32),theta,alpha,flag=[0,0]);
+        yellow_line = get('hdl');
+        yellow_line.thickness = 3;
+        captions(yellow_line, "the real "+StrFunc+" function", "lower_caption");
+    end
+
+
+
     drawnow();
 
 endfunction
index f6885f2..1dc8229 100644 (file)
@@ -644,6 +644,35 @@ function []=PlotCmplxFunc(R,e,TypeDomain,TypeCut,n,StrFunc,theta,alpha,DomReal)
     // draw
     // ============================================
 
+    // Title
+    // ============================================
+
+    my_title_axes             = newaxes();
+    my_title_axes.axes_bounds = [1/3,0,2/3,1];
+    my_title_axes.margins     = [ 0.08 0.08 0.08 0.08 ]
+
+    // make axes transparent
+    my_title_axes.filled = "off";
+
+    Rs = string(R);
+
+    if TypeDomain == "Square" then
+        end_title = " Function on [-"+Rs+","+Rs+"]x[-"+Rs+","+Rs+"]"
+    else
+        end_title = " Function on D(0,R="+Rs+")"
+    end
+
+    if StrFunc == "f" then
+        the_title = "Your Custom (named f) Complex" + end_title;
+    else
+        the_title = "The Complex " + StrFunc + end_title;
+    end
+
+    xtitle(the_title);
+
+    my_title_axes.title.text       = the_title;
+    my_title_axes.title.font_size  = 3;
+
     // plot Im(z)
     // ============================================
 
@@ -688,35 +717,6 @@ function []=PlotCmplxFunc(R,e,TypeDomain,TypeCut,n,StrFunc,theta,alpha,DomReal)
         yellow_line.thickness = 3;
     end
 
-    // Title
-    // ============================================
-
-    my_title_axes             = newaxes();
-    my_title_axes.axes_bounds = [1/3,0,2/3,1];
-    my_title_axes.margins     = [ 0.08 0.08 0.08 0.08 ]
-
-    // make axes transparent
-    my_title_axes.filled = "off";
-
-    Rs = string(R);
-
-    if TypeDomain == "Square" then
-        end_title = " Function on [-"+Rs+","+Rs+"]x[-"+Rs+","+Rs+"]"
-    else
-        end_title = " Function on D(0,R="+Rs+")"
-    end
-
-    if StrFunc == "f" then
-        the_title = "Your Custom (named f) Complex" + end_title;
-    else
-        the_title = "The Complex " + StrFunc + end_title;
-    end
-
-    xtitle(the_title);
-
-    my_title_axes.title.text       = the_title;
-    my_title_axes.title.font_size  = 3;
-
 endfunction
 
 function [xr,yr,zr,xi,yi,zi] = CmplxFacets(R,e,TypeDomain,TypeCut,n,StrFunc)