changeset 13818:a05e5db7b94e

have some fun with waitbar demo #2
author John W. Eaton <jwe@octave.org>
date Fri, 04 Nov 2011 14:33:44 -0400
parents b3e1f9ae64dc
children 9a8763bcf575
files scripts/plot/waitbar.m
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/waitbar.m	Fri Nov 04 10:57:07 2011 -0700
+++ b/scripts/plot/waitbar.m	Fri Nov 04 14:33:44 2011 -0400
@@ -139,9 +139,23 @@
 
 %!demo
 %! h = waitbar (0, "please wait...");
-%! for i = 0:0.01:1
+%! for i = 0:0.01:0.6
 %!   waitbar (i);
 %! endfor
+%! i = 0.3
+%! waitbar (i, h, "don't you hate taking a step backward?")
+%! pause (0.5)
+%! for i = i:0.005:0.7
+%!   waitbar (i, h);
+%! endfor
+%! waitbar (i, h, "or stalling?")
+%! pause (1)
+%! for i = i:0.003:0.8
+%!   waitbar (i, h, "just a little longer now")
+%! endfor
+%! for i = i:0.001:1
+%!   waitbar (i, h, "please don't be impatient")
+%! endfor
 %! close (h);
 
 %!demo