# HG changeset patch # User Ben Abbott # Date 1237938116 14400 # Node ID dd5725531732d033fa4d39e772eaa2f67744097e # Parent f914834836e75c63bcf99af360eb1e9459e1b48d gnuplot_drawnow.m: When printing, pass scalar plot_stream to __gnuplot_draw_figure__, and close all plot streams when done. diff -r f914834836e7 -r dd5725531732 scripts/ChangeLog --- a/scripts/ChangeLog Tue Mar 24 11:29:53 2009 -0400 +++ b/scripts/ChangeLog Tue Mar 24 19:41:56 2009 -0400 @@ -1,3 +1,8 @@ +2009-03-24 Ben Abbott + + * plot/gnuplot_drawnow.m: When printing, pass scalar plot_stream + to __gnuplot_draw_figure__, and close all plot streams when done. + 2009-03-24 John W. Eaton * general/isa.m: Handle parent classes. diff -r f914834836e7 -r dd5725531732 scripts/plot/gnuplot_drawnow.m --- a/scripts/plot/gnuplot_drawnow.m Tue Mar 24 11:29:53 2009 -0400 +++ b/scripts/plot/gnuplot_drawnow.m Tue Mar 24 19:41:56 2009 -0400 @@ -52,7 +52,7 @@ if (gnuplot_supports_term) [enhanced, implicit_margin] = gnuplot_set_term (plot_stream (1), true, h, term, file); - __go_draw_figure__ (h, plot_stream, enhanced, mono, printing, implicit_margin); + __go_draw_figure__ (h, plot_stream(1), enhanced, mono, printing, implicit_margin); if (nargin == 5) fid = fopen (debug_file, "wb"); [enhanced, implicit_margin] = gnuplot_set_term (fid, true, h, term, file); @@ -64,7 +64,10 @@ endif unwind_protect_cleanup if (! isempty (plot_stream)) - pclose (plot_stream); + pclose (plot_stream(1)); + if (numel (plot_stream) == 2) + pclose (plot_stream(2)); + endif endif if (! isempty (fid)) fclose (fid);