Mercurial > hg > octave-lojdl
changeset 4422:92be67bc9301
[project @ 2003-06-04 17:43:15 by jwe]
author | jwe |
---|---|
date | Wed, 04 Jun 2003 17:43:15 +0000 |
parents | 747e1e895f7c |
children | 961d9767275f |
files | ChangeLog doc/interpreter/plot.txi emacs/octave-mod.el scripts/ChangeLog scripts/control/base/__stepimp__.m scripts/control/base/bode.m scripts/control/base/nichols.m scripts/control/base/nyquist.m scripts/miscellaneous/dump_prefs.m scripts/plot/bottom_title.m scripts/plot/mplot.m scripts/plot/multiplot.m scripts/plot/oneplot.m scripts/plot/plot_border.m scripts/plot/subplot.m scripts/plot/subwindow.m scripts/plot/top_title.m scripts/signal/freqz_plot.m src/ChangeLog src/pt-plot.cc |
diffstat | 20 files changed, 87 insertions(+), 171 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-06-04 John W. Eaton <jwe@bevo.che.wisc.edu> + + * emacs/octave-mod.el (octave-variables): Eliminate + gnuplot_has_multiplot. + 2003-05-21 John W. Eaton <jwe@bevo.che.wisc.edu> * configure.in: In check for f_open in libf2c, only use
--- a/doc/interpreter/plot.txi +++ b/doc/interpreter/plot.txi @@ -349,8 +349,6 @@ @DOCSTRING(gnuplot_has_frames) -@DOCSTRING(gnuplot_has_multiplot) - @DOCSTRING(graw) @DOCSTRING(gnuplot_command_plot)
--- a/emacs/octave-mod.el +++ b/emacs/octave-mod.el @@ -142,7 +142,7 @@ "default_return_value" "default_save_format" "define_all_return_values" "do_fortran_indexing" "e" "echo_executing_commands" "empty_list_elements_ok" "eps" - "error_text" "gnuplot_binary" "gnuplot_has_multiplot" "history_file" + "error_text" "gnuplot_binary" "history_file" "history_size" "ignore_function_time_stamp" "implicit_str_to_num_ok" "inf" "nan" "nargin" "ok_to_lose_imaginary_part" "output_max_field_width" "output_precision"
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,12 @@ +2003-06-04 John W. Eaton <jwe@bevo.che.wisc.edu> + + * control/base/__stepimp__.m, control/base/nichols.m, + control/base/nyquist.m, miscellaneous/dump_prefs.m, + plot/bottom_title.m, plot/mplot.m, plot/multiplot.m, + plot/oneplot.m, plot/plot_border.m, plot/subplot.m, + plot/subwindow.m, plot/top_title.m, signal/freqz_plot.m: + Eliminate gnuplot_has_multiplot (assume it is always true). + 2003-05-14 John W. Eaton <jwe@bevo.che.wisc.edu> * Makefile.in, image/Makefile.in, startup/Makefile.in: Handle DESTDIR.
--- a/scripts/control/base/__stepimp__.m +++ b/scripts/control/base/__stepimp__.m @@ -224,60 +224,46 @@ gset autoscale gset nokey clearplot(); - if (gnuplot_has_multiplot) - if (IMPULSE) - gm = zeros(NOUT, 1); - tt = "impulse"; + if (IMPULSE) + gm = zeros(NOUT, 1); + tt = "impulse"; + else + ssys = ss2sys(F, G, C, D, t_step); + gm = dcgain(ssys); + tt = "step"; + endif + ncols = floor(sqrt(NOUT)); + nrows = ceil(NOUT / ncols); + for i = 1:NOUT + subplot(nrows, ncols, i); + title(sprintf("%s: | %s -> %s", tt,sysgetsignals(sys,"in",inp,1), ... + sysgetsignals(sys,"out",i,1))); + if (DIGITAL) + [ts, ys] = stairs(t, y(i,:)); + ts = ts(1:2*n-2)'; ys = ys(1:2*n-2)'; + if (length(gm) > 0) + yy = [ys; gm(i)*ones(size(ts))]; + else + yy = ys; + endif + grid("on"); + xlabel("time [s]"); + ylabel("y(t)"); + plot(ts, yy); else - ssys = ss2sys(F, G, C, D, t_step); - gm = dcgain(ssys); - tt = "step"; + if (length(gm) > 0) + yy = [y(i,:); gm(i)*ones(size(t))]; + else + yy = y(i,:); + endif + grid("on"); + xlabel("time [s]"); + ylabel("y(t)"); + plot(t, yy); endif - ncols = floor(sqrt(NOUT)); - nrows = ceil(NOUT / ncols); - for i = 1:NOUT - subplot(nrows, ncols, i); - title(sprintf("%s: | %s -> %s", tt,sysgetsignals(sys,"in",inp,1), ... - sysgetsignals(sys,"out",i,1))); - if (DIGITAL) - [ts, ys] = stairs(t, y(i,:)); - ts = ts(1:2*n-2)'; ys = ys(1:2*n-2)'; - if (length(gm) > 0) - yy = [ys; gm(i)*ones(size(ts))]; - else - yy = ys; - endif - grid("on"); - xlabel("time [s]"); - ylabel("y(t)"); - plot(ts, yy); - else - if (length(gm) > 0) - yy = [y(i,:); gm(i)*ones(size(t))]; - else - yy = y(i,:); - endif - grid("on"); - xlabel("time [s]"); - ylabel("y(t)"); - plot(t, yy); - endif - endfor - ## leave gnuplot in multiplot mode is bad style - oneplot(); - else - ## plot everything in one diagram - title([tt, " response | ", sysgetsignals(sys,"in",inp,1), ... - " -> all outputs"]); - if (DIGITAL) - stairs(t, y(i,:)); - else - grid("on"); - xlabel("time [s]"); - ylabel("y(t)"); - plot(t, y(i,:)); - endif - endif + endfor + ## leave gnuplot in multiplot mode is bad style + oneplot(); y=[]; t=[]; endif
--- a/scripts/control/base/bode.m +++ b/scripts/control/base/bode.m @@ -148,13 +148,9 @@ save_automatic_replot = automatic_replot; unwind_protect automatic_replot = 0; - if(gnuplot_has_multiplot) - oneplot(); - endif + oneplot(); gset autoscale; - if(gnuplot_has_multiplot) - gset nokey; - endif + gset nokey; clearplot(); gset data style lines; if(is_digital(sys)) @@ -166,9 +162,7 @@ endif xlabel(xlstr); if(is_siso(sys)) - if (gnuplot_has_multiplot) - subplot(2,1,1); - endif + subplot(2,1,1); title(["|[Y/U]",tistr,"|, u=", nth(inname,1),", y=",nth(outname,1)]); else title([ "||Y(", tistr, ")/U(", tistr, ")||"]); @@ -196,11 +190,7 @@ loglog(w,md); endif if (is_siso(sys)) - if (gnuplot_has_multiplot) - subplot(2,1,2); - else - prompt("Press any key for phase plot"); - endif + subplot(2,1,2); axvec = axis2dlim([vec(w),vec(phase)]); axvec(1:2) = wv; axis(axvec); @@ -211,9 +201,7 @@ grid("on"); semilogx(w,phase); ## This should be the default for subsequent plot commands. - if(gnuplot_has_multiplot) - oneplot(); - endif + oneplot(); endif unwind_protect_cleanup automatic_replot = save_automatic_replot;
--- a/scripts/control/base/nichols.m +++ b/scripts/control/base/nichols.m @@ -78,13 +78,9 @@ if (nargout < 1), ## Plot the information - if(gnuplot_has_multiplot) - oneplot(); - endif + oneplot(); gset autoscale; - if(gnuplot_has_multiplot) - gset nokey; - endif + gset nokey; clearplot(); grid("on"); gset data style lines;
--- a/scripts/control/base/nyquist.m +++ b/scripts/control/base/nyquist.m @@ -129,10 +129,8 @@ if (nargout == 0) dnplot = 0; while(!dnplot) - if(gnuplot_has_multiplot) - oneplot(); - gset key; - endif + oneplot(); + gset key; clearplot(); grid ("on"); gset data style lines;
--- a/scripts/miscellaneous/dump_prefs.m +++ b/scripts/miscellaneous/dump_prefs.m @@ -68,7 +68,6 @@ "gnuplot_command_using"; "gnuplot_command_with"; "gnuplot_has_frames"; - "gnuplot_has_multiplot"; "history_file"; "history_size"; "ignore_function_time_stamp";
--- a/scripts/plot/bottom_title.m +++ b/scripts/plot/bottom_title.m @@ -27,10 +27,6 @@ function bottom_title (text) - if (! gnuplot_has_multiplot) - error ("bottom_title: gnuplot does not appear to support this feature"); - endif - if (nargin != 1) usage ("bottom_title (text)"); endif
--- a/scripts/plot/mplot.m +++ b/scripts/plot/mplot.m @@ -34,10 +34,6 @@ function mplot (varargin) - if (! gnuplot_has_multiplot) - error ("mplot: gnuplot does not appear to support this feature"); - endif - ## global variables to keep track of multiplot options global __multiplot_mode__ = 0;
--- a/scripts/plot/multiplot.m +++ b/scripts/plot/multiplot.m @@ -33,10 +33,6 @@ function multiplot (xn, yn) - if (! gnuplot_has_multiplot) - error ("multiplot: gnuplot does not appear to support this feature"); - endif - ## global variables to keep track of multiplot options global __multiplot_mode__ = 0;
--- a/scripts/plot/oneplot.m +++ b/scripts/plot/oneplot.m @@ -28,18 +28,14 @@ function oneplot () - if (gnuplot_has_multiplot) - - global __multiplot_mode__ = 0; + global __multiplot_mode__ = 0; - if (__multiplot_mode__) - gset nomultiplot; - gset size 1, 1; - gset origin 0, 0; - __multiplot_mode__ = 0; - gnuplot_command_replot = "rep"; - endif - + if (__multiplot_mode__) + gset nomultiplot; + gset size 1, 1; + gset origin 0, 0; + __multiplot_mode__ = 0; + gnuplot_command_replot = "rep"; endif endfunction
--- a/scripts/plot/plot_border.m +++ b/scripts/plot/plot_border.m @@ -53,10 +53,6 @@ function plot_border (varargin) - if (! gnuplot_has_multiplot) - error ("plot_border: gnuplot does not appear to support this feature"); - endif - south = 0; west = 0; north = 0;
--- a/scripts/plot/subplot.m +++ b/scripts/plot/subplot.m @@ -74,10 +74,6 @@ function subplot (rows, columns, index) - if (! gnuplot_has_multiplot) - error ("subplot: gnuplot does not appear to support this feature"); - endif - ## global variables to keep track of multiplot options global __multiplot_mode__ = 0;
--- a/scripts/plot/subwindow.m +++ b/scripts/plot/subwindow.m @@ -31,10 +31,6 @@ function subwindow (xn, yn) - if (! gnuplot_has_multiplot) - error ("subwindow: gnuplot does not appear to support this feature"); - endif - ## global variables to keep track of multiplot options global __multiplot_mode__ = 0;
--- a/scripts/plot/top_title.m +++ b/scripts/plot/top_title.m @@ -29,10 +29,6 @@ function top_title (text) - if (! gnuplot_has_multiplot) - error ("top_title: gnuplot does not appear to support this feature"); - endif - if (nargin != 1) usage ("top_title (text)"); endif
--- a/scripts/signal/freqz_plot.m +++ b/scripts/signal/freqz_plot.m @@ -41,25 +41,19 @@ ## Protect graph state. - if (gnuplot_has_multiplot) - subplot (311); - gset lmargin 10; - axis ("labely"); - xlabel (""); - endif + subplot (311); + gset lmargin 10; + axis ("labely"); + xlabel (""); grid ("on"); axis ([ w(1), w(n), maxmag-3, maxmag ]); plot (w, mag, ";Pass band (dB);"); - if (gnuplot_has_multiplot) - subplot (312); - axis ("labely"); - title (""); - xlabel (""); - gset tmargin 0; - else - input ("press any key for the next plot: "); - endif + subplot (312); + axis ("labely"); + title (""); + xlabel (""); + gset tmargin 0; grid ("on"); if (maxmag - min (mag) > 100) axis ([ w(1), w(n), maxmag-100, maxmag ]); @@ -68,13 +62,9 @@ endif plot (w, mag, ";Stop band (dB);"); - if (gnuplot_has_multiplot) - subplot (313); - axis ("label"); - title (""); - else - input ("press any key for the next plot: "); - endif + subplot (313); + axis ("label"); + title (""); grid ("on"); axis ("autoy"); xlabel ("Frequency");
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2003-06-04 John W. Eaton <jwe@bevo.che.wisc.edu> + + * pt-plot.cc (Vgnuplot_has_multiplot): Delete variable. + (gnuplot_has_multiplot): Delete. + (symbols_of_pt_plot): Delete DEFVAR for gnuplot_has_multiplot. + 2003-05-28 Teemu Ikonen <tpikonen@pcu.helsinki.fi> * load-save.cc (save_mat5_binary_element, save_mat_binary_data):
--- a/src/pt-plot.cc +++ b/src/pt-plot.cc @@ -72,9 +72,6 @@ // TRUE if gnuplot appears to support multiple plot windows with X11. static bool Vgnuplot_has_frames; -// TRUE if gnuplot appears to support multiplot. -static bool Vgnuplot_has_multiplot; - // The number of lines we've plotted so far. static int plot_line_count = 0; @@ -1272,14 +1269,6 @@ return 0; } -static int -gnuplot_has_multiplot (void) -{ - Vgnuplot_has_multiplot = check_preference ("gnuplot_has_multiplot"); - - return 0; -} - void symbols_of_pt_plot (void) { @@ -1354,22 +1343,6 @@ can be changed in your startup script or at the command line in case\n\ configure got it wrong, or if you upgrade your gnuplot installation.\n\ @end defvr"); - -#if defined (GNUPLOT_HAS_MULTIPLOT) - bool with_multiplot = true; -#else - bool with_multiplot = false; -#endif - - DEFVAR (gnuplot_has_multiplot, with_multiplot, gnuplot_has_multiplot, - "-*- texinfo -*-\n\ -@defvr {Built-in Variable} gnuplot_has_multiplot\n\ -If the value of this variable is nonzero, Octave assumes that your copy\n\ -of gnuplot has the multiplot support that is included in recent\n\ -3.6beta releases. It's initial value is determined by configure, but it\n\ -can be changed in your startup script or at the command line in case\n\ -configure got it wrong, or if you upgrade your gnuplot installation.\n\ -@end defvr"); } /*