* Bug 15816 fixed: upstream drawlater ignored by polarplot, mesh, pie, contourf
[scilab.git] / scilab / modules / graphics / macros / contourf.sci
index 93701a5..c6a97e9 100644 (file)
@@ -177,6 +177,9 @@ function contourf(x, y, z, nv, style, strf, leg, rect, nax)
     min_nv=min(nv);
     max_nv=max(nv);
 
+    initDrawingMode = gcf().immediate_drawing;
+    gcf().immediate_drawing = "off";
+
     plot2d([min(xx);max(xx)],[min(yy);max(yy)],0,strf,leg,rect,nax);
 
     // Plot patches in order of decreasing size. This makes sure that
@@ -191,7 +194,6 @@ function contourf(x, y, z, nv, style, strf, leg, rect, nax)
     H=[];
     [FA,IA]=gsort(abs(Area));
 
-    drawlater(); // postpone the drawing here
     ax = gca();
     old_foreground = ax.foreground;
     pat = old_foreground;
@@ -211,7 +213,7 @@ function contourf(x, y, z, nv, style, strf, leg, rect, nax)
         contour2d(xx,yy,zz,nv,style,"000",leg,rect,nax);
     end
     ax.foreground = old_foreground;
-    drawnow(); // draw all now!
 
+    gcf().immediate_drawing = initDrawingMode;
 endfunction