changeset 17432:f58ad514372c

__contour__.m: Turn off auto clim adjustment while patches are being added. And then turn back on when complete. Performance increase. * scripts/plot/private/__contour__.m: Set climmode to manual while adding patch objects and then restore mode at end of for loop.
author Rik <rik@octave.org>
date Wed, 11 Sep 2013 15:44:20 -0700
parents f47cfca56eb9
children 95bfa04ab514
files scripts/plot/private/__contour__.m
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/private/__contour__.m
+++ b/scripts/plot/private/__contour__.m
@@ -235,6 +235,10 @@
   filled = get (hg, "fill");
   ca = gca ();
 
+  ## Turn off automatic updating of clim while adding patches
+  climmode = get (ca, "climmode");
+  set (ca, "climmode", "manual"); 
+
   if (strcmpi (lc, "auto"))
     lc = "flat";
   endif
@@ -393,6 +397,8 @@
     endwhile
   endif
 
+  set (ca, "climmode", climmode);
+
 endfunction
 
 function update_zlevel (h, d)