# HG changeset patch # User Ben Abbott # Date 1234935984 18000 # Node ID a013ff655ca48f15cc2c72aa938f2e3cb6e50ba9 # Parent d9bff42fec435c15ea830e075f821156f3a583b7 Trivial changes to demos to produce a more pleasant output for octave+gnuplot+aquaterm. diff -r d9bff42fec43 -r a013ff655ca4 scripts/ChangeLog --- a/scripts/ChangeLog Wed Feb 18 00:43:03 2009 -0500 +++ b/scripts/ChangeLog Wed Feb 18 00:46:24 2009 -0500 @@ -1,4 +1,13 @@ -2009-02-17 Ben Abbott +2009-02-17 Ben Abbott + + * plot/contourc.m: Convert demo to test. + * plot/surfnorm.m: Add another demo. + * plot/surfnorm.m, plot/pareto.m: Add "colormap(jet)" to 1st demo. + * plot/plotyy.m, plot/patch.m, plot/pareto.m, plot/legend.m, + plot/fill.m, plot/comet.m, plot/colorbar.m, plot/clabel.m: + Replace "close all" with "clf" in demo. + +2009-02-17 Ben Abbott * plot/gnuplot_drawnow.m: Only close the gnuplot window and send position/size info when the figure's position property has changed. @@ -18,7 +27,7 @@ * help/__strip_html_tags__.m, help/__additional_help_message__.m: Doc fix. -2009-02-16 Ben Abbott +2009-02-16 Ben Abbott * plot/shading.m: No new figure windows for the demos. * plot/surfl.m: Clear figure before running demos. @@ -58,11 +67,11 @@ New functions. * deprecated/Makefile.in (SOURCES): Add them to the list. -2009-02-15 Ben Abbott +2009-02-15 Ben Abbott * plot/subplot.m: Compatible placement of subplots. -2009-02-13 Ben Abbott +2009-02-13 Ben Abbott * plot/__go_draw_axes__.m: Respect axes ticklength property. @@ -230,7 +239,7 @@ * plot/Makefile.in (SOURCES): Include diffuse.m, specular.m, and surfl.m in the list. -2009-01-28 Ben Abbott +2009-01-28 Ben Abbott * plot/gnuplot_drawnow.m: Style fixes. @@ -309,11 +318,11 @@ first step. Simplify options. Adjust defaults - make TR radius tolerance less stringent. Support DisplayFcn. -2008-12-24 Ben Abbott +2008-12-24 Ben Abbott * path/savepath.m: Respect cmd-line and env paths. -2009-01-24 Ben Abbott +2009-01-24 Ben Abbott * sparse/svds.m: svds.m: skip tests if ARPACK is missing. @@ -386,7 +395,7 @@ * testfun/assert.m: Use isfield instead of struct_contains. -2009-01-17 Ben Abbott +2009-01-17 Ben Abbott * general/cart2sph.m, cart2pol.m, sph2cart.m pol2cart.m: Permit scalars when transforming coordinates. @@ -575,11 +584,11 @@ * plot/hist.m: Doc string now mentions matrix input argument. Correct error message. -2008-12-30 Ben Abbott +2008-12-30 Ben Abbott * plot/__contour__.m: __contour__.m: correct order of patches -2008-12-30 Ben Abbott +2008-12-30 Ben Abbott * plot/__contour__.m: __contour__.m: correct order of patches @@ -667,11 +676,11 @@ miscellaneous/__xzip__.m: Improve error messages, fix cleanup of temporary directories, remove tab characters -2008-11-24 Ben Abbott +2008-11-24 Ben Abbott * plot/legend.m: Correct ording of legend labels. -2008-11-24 Ben Abbott +2008-11-24 Ben Abbott * plot/__go_draw_axes__.m: Correct order for rendering children. @@ -685,7 +694,7 @@ * plot/__go_draw_axes__.m (do_tics_1): Support the minorick properties of the axis object. -2008-11-14 Ben Abbott +2008-11-14 Ben Abbott * plot/gnuplot_drawnow.m: Add support of properites to gp backend. @@ -719,7 +728,7 @@ * miscellaneous/unpack.m: return directly after recursive handling of cell-strings -2008-11-03 Ben Abbott +2008-11-03 Ben Abbott * plot/__go_draw_axes__.m: xticklabel should accept a numeric vector. @@ -810,7 +819,7 @@ * plot/ellipsoid.m: Check nargin == 6, not nargin == 5. -2008-10-22 Ben Abbott +2008-10-22 Ben Abbott * plot/cla.m: Fix error when no children to clear. diff -r d9bff42fec43 -r a013ff655ca4 scripts/plot/clabel.m --- a/scripts/plot/clabel.m Wed Feb 18 00:43:03 2009 -0500 +++ b/scripts/plot/clabel.m Wed Feb 18 00:46:24 2009 -0500 @@ -129,11 +129,11 @@ endfunction %!demo -%! close all +%! clf %! [c, h] = contour (peaks(), -4 : 6); %! clabel (c, h, -4 : 2 : 6, 'fontsize', 12); %!demo -%! close all +%! clf %! [c, h] = contourf (peaks(), -7 : 6); %! clabel (c, h, -6 : 2 : 6, 'fontsize', 12); diff -r d9bff42fec43 -r a013ff655ca4 scripts/plot/colorbar.m --- a/scripts/plot/colorbar.m Wed Feb 18 00:43:03 2009 -0500 +++ b/scripts/plot/colorbar.m Wed Feb 18 00:46:24 2009 -0500 @@ -345,7 +345,7 @@ %!demo %! hold off; -%! close all; +%! clf %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); %! imagesc(x) %! colorbar(); diff -r d9bff42fec43 -r a013ff655ca4 scripts/plot/comet.m --- a/scripts/plot/comet.m Wed Feb 18 00:43:03 2009 -0500 +++ b/scripts/plot/comet.m Wed Feb 18 00:46:24 2009 -0500 @@ -80,7 +80,7 @@ endfunction %!demo -%! close all; +%! clf %! t = 0:.1:2*pi; %! x = cos(2*t).*(cos(t).^2); %! y = sin(2*t).*(sin(t).^2); diff -r d9bff42fec43 -r a013ff655ca4 scripts/plot/contourc.m --- a/scripts/plot/contourc.m Wed Feb 18 00:43:03 2009 -0500 +++ b/scripts/plot/contourc.m Wed Feb 18 00:46:24 2009 -0500 @@ -134,8 +134,14 @@ endfunction -%!demo +%!test %! x = 0:2; %! y = x; %! z = x' * y; -%! contourc (x, y, z, 2:3) +%! [c_actual, lev_actual]= contourc (x, y, z, 2:3); +%! c_expected = [2, 1, 1, 2, 2, 3, 1.5, 2; 4, 2, 2, 1, 1, 2, 2, 1.5]; +%! lev_expected = [2 3]; +%! assert (c_actual, c_expected, eps) +%! assert (lev_actual, lev_expected, eps) + + diff -r d9bff42fec43 -r a013ff655ca4 scripts/plot/fill.m --- a/scripts/plot/fill.m Wed Feb 18 00:43:03 2009 -0500 +++ b/scripts/plot/fill.m Wed Feb 18 00:46:24 2009 -0500 @@ -108,7 +108,7 @@ endfunction %!demo -%! close all; +%! clf %! t1 = (1/16:1/8:1)'*2*pi; %! t2 = ((1/16:1/8:1)' + 1/32)*2*pi; %! x1 = sin(t1) - 0.8; diff -r d9bff42fec43 -r a013ff655ca4 scripts/plot/legend.m --- a/scripts/plot/legend.m Wed Feb 18 00:43:03 2009 -0500 +++ b/scripts/plot/legend.m Wed Feb 18 00:46:24 2009 -0500 @@ -228,19 +228,19 @@ endfunction %!demo -%! close all; +%! clf %! plot(1:10, 1:10, 1:10, fliplr(1:10)); %! title("incline is blue and decline is green"); %! legend({"I'm blue", "I'm green"}, "location", "east") %!demo -%! close all; +%! clf %! plot(1:10, 1:10); %! title("a very long label can sometimes cause problems"); %! legend({"hello world"}, "location", "northeastoutside") %!demo -%! close all; +%! clf %! labels = {}; %! for i = 1:5 %! plot(1:100, i + rand(100,1)); hold on; diff -r d9bff42fec43 -r a013ff655ca4 scripts/plot/pareto.m --- a/scripts/plot/pareto.m Wed Feb 18 00:43:03 2009 -0500 +++ b/scripts/plot/pareto.m Wed Feb 18 00:46:24 2009 -0500 @@ -100,13 +100,14 @@ endfunction %!demo -%! close +%! clf +%! colormap (jet (64)) %! Cheese = {"Cheddar", "Swiss", "Camembert", "Munster", "Stilton", "Blue"}; %! Sold = [105, 30, 70, 10, 15, 20]; %! pareto(Sold, Cheese); %!demo -%! close +%! clf %! % Suppose that we want establish which products makes 80 % of turnover. %! Codes = {"AB4","BD7","CF8","CC5","AD11","BB5","BB3","AD8","DF3","DE7"}; %! Value = [2.35 7.9 2.45 1.1 0.15 13.45 5.4 2.05 0.85 1.65]'; diff -r d9bff42fec43 -r a013ff655ca4 scripts/plot/patch.m --- a/scripts/plot/patch.m Wed Feb 18 00:43:03 2009 -0500 +++ b/scripts/plot/patch.m Wed Feb 18 00:46:24 2009 -0500 @@ -59,7 +59,7 @@ %!demo %! ## Patches with same number of vertices -%! close all; +%! clf %! t1 = (1/16:1/8:1)'*2*pi; %! t2 = ((1/16:1/8:1)' + 1/32)*2*pi; %! x1 = sin(t1) - 0.8; @@ -70,7 +70,7 @@ %!demo %! ## Unclosed patch -%! close all; +%! clf %! t1 = (1/16:1/8:1)'*2*pi; %! t2 = ((1/16:1/16:1)' + 1/32)*2*pi; %! x1 = sin(t1) - 0.8; @@ -81,7 +81,7 @@ %!demo %! ## Specify vertices and faces separately -%! close all; +%! clf %! t1 = (1/16:1/8:1)'*2*pi; %! t2 = ((1/16:1/16:1)' + 1/32)*2*pi; %! x1 = sin(t1) - 0.8; @@ -94,7 +94,7 @@ %!demo %! ## Property change on multiple patches -%! close all; +%! clf %! t1 = (1/16:1/8:1)'*2*pi; %! t2 = ((1/16:1/8:1)' + 1/32)*2*pi; %! x1 = sin(t1) - 0.8; diff -r d9bff42fec43 -r a013ff655ca4 scripts/plot/plotyy.m --- a/scripts/plot/plotyy.m Wed Feb 18 00:43:03 2009 -0500 +++ b/scripts/plot/plotyy.m Wed Feb 18 00:46:24 2009 -0500 @@ -185,7 +185,7 @@ endfunction %!demo -%! close all; +%! clf %! x = 0:0.1:2*pi; %! y1 = sin (x); %! y2 = exp (x - 1); diff -r d9bff42fec43 -r a013ff655ca4 scripts/plot/surfnorm.m --- a/scripts/plot/surfnorm.m Wed Feb 18 00:43:03 2009 -0500 +++ b/scripts/plot/surfnorm.m Wed Feb 18 00:46:24 2009 -0500 @@ -136,8 +136,13 @@ endfunction %!demo +%! colormap (jet (64)) %! [x, y, z] = peaks(10); %! surfnorm (x, y, z); %!demo %! surfnorm (peaks(10)); + +%!demo +%! surfnorm (peaks(32)); +%! shading interp