Mercurial > hg > octave-shane
changeset 6746:a8105a726e68
[project @ 2007-06-19 08:18:34 by dbateman]
author | dbateman |
---|---|
date | Tue, 19 Jun 2007 08:18:34 +0000 |
parents | ca6668e47518 |
children | 392d61107f11 |
files | scripts/ChangeLog scripts/plot/axis.m scripts/polynomial/mkpp.m scripts/polynomial/pchip.m scripts/signal/freqz_plot.m scripts/sparse/gplot.m scripts/sparse/treeplot.m |
diffstat | 7 files changed, 41 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,13 @@ +2007-06-19 David Bateman <dbateman@free.fr> + + * 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 <jwe@octave.org> * plot/__go_draw_axes__.m (do_tics, do_tics_1): New functions.
--- a/scripts/plot/axis.m +++ b/scripts/plot/axis.m @@ -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.
--- a/scripts/polynomial/mkpp.m +++ b/scripts/polynomial/mkpp.m @@ -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");
--- a/scripts/polynomial/pchip.m +++ b/scripts/polynomial/pchip.m @@ -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
--- a/scripts/signal/freqz_plot.m +++ b/scripts/signal/freqz_plot.m @@ -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");
--- a/scripts/sparse/gplot.m +++ b/scripts/sparse/gplot.m @@ -38,7 +38,7 @@ endif if (nargin == 2) - line_style = "-;;"; + line_style = "-"; endif [i, j] = find (A);
--- a/scripts/sparse/treeplot.m +++ b/scripts/sparse/treeplot.m @@ -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)