# HG changeset patch # User dbateman # Date 1182241114 0 # Node ID a8105a726e68442a4184c95626fadcba6ed75a9d # Parent ca6668e475182a2bec8b77a0a5eb62c24312e4b6 [project @ 2007-06-19 08:18:34 by dbateman] diff -r ca6668e47518 -r a8105a726e68 scripts/ChangeLog --- a/scripts/ChangeLog Tue Jun 19 06:00:08 2007 +0000 +++ b/scripts/ChangeLog Tue Jun 19 08:18:34 2007 +0000 @@ -1,3 +1,13 @@ +2007-06-19 David Bateman + + * plot/axis.m: Prefer to use legend rather than the older Octave + only ";;" legend syntax. + * polynomial/mkpp.m: ditto. + * polynomial/pchip.m: ditto. + * signal/freqz_plot.m: ditto. + * sparse/gplot.m: ditto. + * sparse/treeplot.m: ditto. + 2007-06-19 John W. Eaton * plot/__go_draw_axes__.m (do_tics, do_tics_1): New functions. diff -r ca6668e47518 -r a8105a726e68 scripts/plot/axis.m --- a/scripts/plot/axis.m Tue Jun 19 06:00:08 2007 +0000 +++ b/scripts/plot/axis.m Tue Jun 19 08:18:34 2007 +0000 @@ -262,64 +262,64 @@ %! t=0:0.01:2*pi; x=sin(t); %! %! subplot(221); title("normal plot"); -%! plot(t, x, ";;"); +%! plot(t, x); %! %! subplot(222); title("square plot"); -%! axis("square"); plot(t, x, ";;"); +%! axis("square"); plot(t, x); %! %! subplot(223); title("equal plot"); -%! axis("equal"); plot(t, x, ";;"); +%! axis("equal"); plot(t, x); %! %! subplot(224); title("normal plot again"); -%! axis("normal"); plot(t, x, ";;"); +%! axis("normal"); plot(t, x); %!demo %! t=0:0.01:2*pi; x=sin(t); %! %! subplot(121); title("ij plot"); -%! axis("ij"); plot(t, x, ";;"); +%! axis("ij"); plot(t, x); %! %! subplot(122); title("xy plot"); -%! axis("xy"); plot(t, x, ";;"); +%! axis("xy"); plot(t, x); %!demo %! t=0:0.01:2*pi; x=sin(t); %! %! subplot(331); title("x tics & labels"); -%! axis("ticx"); plot(t, x, ";;"); +%! axis("ticx"); plot(t, x); %! %! subplot(332); title("y tics & labels"); -%! axis("ticy"); plot(t, x, ";;"); +%! axis("ticy"); plot(t, x); %! %! subplot(334); title("x & y tics, x labels"); -%! axis("labelx","tic"); plot(t, x, ";;"); +%! axis("labelx","tic"); plot(t, x); %! %! subplot(335); title("x & y tics, y labels"); -%! axis("labely","tic"); plot(t, x, ";;"); +%! axis("labely","tic"); plot(t, x); %! %! subplot(337); title("x tics, no labels"); -%! axis("nolabel","ticx"); plot(t, x, ";;"); +%! axis("nolabel","ticx"); plot(t, x); %! %! subplot(338); title("y tics, no labels"); -%! axis("nolabel","ticy"); plot(t, x, ";;"); +%! axis("nolabel","ticy"); plot(t, x); %! %! subplot(333); title("no tics or labels"); -%! axis("off"); plot(t, x, ";;"); +%! axis("off"); plot(t, x); %! %! subplot(336); title("all tics but no labels"); -%! axis("nolabel","tic"); plot(t, x, ";;"); +%! axis("nolabel","tic"); plot(t, x); %! %! subplot(339); title("all tics & labels"); -%! axis("on"); plot(t, x, ";;"); +%! axis("on"); plot(t, x); %!demo %! t=0:0.01:2*pi; x=sin(t); %! %! subplot(321); title("axes at [0 3 0 1]") -%! axis([0,3,0,1]); plot(t, x, ";;"); +%! axis([0,3,0,1]); plot(t, x); %! %! subplot(322); title("auto"); -%! axis("auto"); plot(t, x, ";;"); +%! axis("auto"); plot(t, x); %! %! subplot(323); title("manual"); %! plot(t, x, ";sine [0:2pi];"); hold on; @@ -335,6 +335,6 @@ %! plot(t, x, ";sine [0:2p];"); %! %! subplot(326); title("tight"); -%! axis("tight"); plot(t, x, ";;"); +%! axis("tight"); plot(t, x); %! % The last plot should not have any whitespace outside the data %! % limits, but "tight" isn't implemented yet. diff -r ca6668e47518 -r a8105a726e68 scripts/polynomial/mkpp.m --- a/scripts/polynomial/mkpp.m Tue Jun 19 06:00:08 2007 +0000 +++ b/scripts/polynomial/mkpp.m Tue Jun 19 08:18:34 2007 +0000 @@ -64,4 +64,5 @@ %! b=t(1:4,:); %! pp = mkpp(x, [m(:),b(:)]); %! xi=linspace(0,pi,50); -%! plot(x,t,"x;control;",xi,ppval(pp,xi),";interp;"); +%! plot(x,t,"x",xi,ppval(pp,xi)); +%! legend("control","interp"); diff -r ca6668e47518 -r a8105a726e68 scripts/polynomial/pchip.m --- a/scripts/polynomial/pchip.m Tue Jun 19 06:00:08 2007 +0000 +++ b/scripts/polynomial/pchip.m Tue Jun 19 08:18:34 2007 +0000 @@ -139,9 +139,8 @@ %! yspline = spline(x,y,xi); %! ypchip = pchip(x,y,xi); %! title("pchip and spline fit to discontinuous function"); -%! plot(xi,yspline,";spline;",... -%! xi,ypchip,"-;pchip;",... -%! x,y,"+;data;"); +%! plot(xi,yspline,xi,ypchip,"-",x,y,"+"); +%! legend ("spline","pchip","data"); %! %------------------------------------------------------------------- %! % confirm that pchip agreed better to discontinuous data than spline diff -r ca6668e47518 -r a8105a726e68 scripts/signal/freqz_plot.m --- a/scripts/signal/freqz_plot.m Tue Jun 19 06:00:08 2007 +0000 +++ b/scripts/signal/freqz_plot.m Tue Jun 19 08:18:34 2007 +0000 @@ -38,13 +38,15 @@ maxmag = max (mag); subplot (3, 1, 1); - plot (w, mag, ";Pass band (dB);"); + plot (w, mag); grid ("on"); + legend("Pass band (dB)"); axis ([w(1), w(n), maxmag-3, maxmag], "labely"); subplot (3, 1, 2); - plot (w, mag, ";Stop band (dB);"); + plot (w, mag); grid ("on"); + legend ("Stop band (dB)"); if (maxmag - min (mag) > 100) axis ([w(1), w(n), maxmag-100, maxmag], "labely"); else @@ -52,8 +54,9 @@ endif subplot (3, 1, 3); - plot (w, phase*360/(2*pi), ";Phase (degrees);"); + plot (w, phase*360/(2*pi)); grid ("on"); + legend ("Phase (degrees)"); xlabel ("Frequency"); axis ([w(1), w(n)], "autoy", "label"); diff -r ca6668e47518 -r a8105a726e68 scripts/sparse/gplot.m --- a/scripts/sparse/gplot.m Tue Jun 19 06:00:08 2007 +0000 +++ b/scripts/sparse/gplot.m Tue Jun 19 08:18:34 2007 +0000 @@ -38,7 +38,7 @@ endif if (nargin == 2) - line_style = "-;;"; + line_style = "-"; endif [i, j] = find (A); diff -r ca6668e47518 -r a8105a726e68 scripts/sparse/treeplot.m --- a/scripts/sparse/treeplot.m Tue Jun 19 06:00:08 2007 +0000 +++ b/scripts/sparse/treeplot.m Tue Jun 19 08:18:34 2007 +0000 @@ -35,8 +35,8 @@ error ("treeplot: the first input argument must be a vector of predecessors"); else ## the inicialization of node end edge style - NodeStyle = "0*;;"; - EdgeStyle = "1;;"; + NodeStyle = "k*"; + EdgeStyle = "r"; if (nargin > 2) EdgeStyle = EdgeS; if (nargin > 1)