comparison scripts/plot/gnuplot_drawnow.m @ 10968:f5c863803e29

gnuplot_drawnow.m: Use new function __gnuplot_has_terminal__().
author Ben Abbott <bpabbott@mac.com>
date Mon, 13 Sep 2010 20:57:44 -0400
parents dd6b90f44ae5
children a8ac114ec9ab
comparison
equal deleted inserted replaced
10967:2470b1bf191a 10968:f5c863803e29
39 plot_stream = []; 39 plot_stream = [];
40 fid = []; 40 fid = [];
41 default_plot_stream = get (h, "__plot_stream__"); 41 default_plot_stream = get (h, "__plot_stream__");
42 unwind_protect 42 unwind_protect
43 plot_stream = __gnuplot_open_stream__ (2, h); 43 plot_stream = __gnuplot_open_stream__ (2, h);
44 if (__gnuplot_has_feature__ ("variable_GPVAL_TERMINALS")) 44 gnuplot_supports_term = __gnuplot_has_terminal__ (term, plot_stream);
45 available_terminals = __gnuplot_get_var__ (plot_stream, "GPVAL_TERMINALS");
46 available_terminals = regexp (available_terminals, "\\b\\w+\\b", "match");
47 gnuplot_supports_term = any (strcmpi (available_terminals,
48 gnuplot_trim_term (term)));
49 else
50 gnuplot_supports_term = true;
51 endif
52 if (gnuplot_supports_term) 45 if (gnuplot_supports_term)
53 enhanced = gnuplot_set_term (plot_stream (1), true, h, term, file); 46 enhanced = gnuplot_set_term (plot_stream (1), true, h, term, file);
54 __go_draw_figure__ (h, plot_stream(1), enhanced, mono); 47 __go_draw_figure__ (h, plot_stream(1), enhanced, mono);
55 if (nargin == 5) 48 if (nargin == 5)
56 fid = fopen (debug_file, "wb"); 49 fid = fopen (debug_file, "wb");