comparison scripts/plot/private/__contour__.m @ 17419: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 1c89599167a6
children a5c6591d01e6
comparison
equal deleted inserted replaced
17418:f47cfca56eb9 17419:f58ad514372c
232 lc = get (hg, "linecolor"); 232 lc = get (hg, "linecolor");
233 lw = get (hg, "linewidth"); 233 lw = get (hg, "linewidth");
234 ls = get (hg, "linestyle"); 234 ls = get (hg, "linestyle");
235 filled = get (hg, "fill"); 235 filled = get (hg, "fill");
236 ca = gca (); 236 ca = gca ();
237
238 ## Turn off automatic updating of clim while adding patches
239 climmode = get (ca, "climmode");
240 set (ca, "climmode", "manual");
237 241
238 if (strcmpi (lc, "auto")) 242 if (strcmpi (lc, "auto"))
239 lc = "flat"; 243 lc = "flat";
240 endif 244 endif
241 245
391 endswitch 395 endswitch
392 i1 += clen + 1; 396 i1 += clen + 1;
393 endwhile 397 endwhile
394 endif 398 endif
395 399
400 set (ca, "climmode", climmode);
401
396 endfunction 402 endfunction
397 403
398 function update_zlevel (h, d) 404 function update_zlevel (h, d)
399 405
400 z = get (h, "zlevel"); 406 z = get (h, "zlevel");