function do_plot (term) if (nargin < 1) term = "wxt"; endif setenv ("GNUTERM", term); persistent x y if (isempty (x)) x = 1:4; y = rand (4); endif h = plot (x, y(1,:), "-", ... x, y(2,:), "--", ... x, y(3,:), "-.", ... x, y(4,:), ":"); set (h, "linewidth", 2); drawnow () endfunction ## Test script. use 'source do_plot.m' to test graphics_toolkit gnuplot #figure (1) #do_plot aqua #keyboard; figure (2) do_plot x11 title ("x11"); pause (0.5); figure (3) do_plot qt title ("qt"); pause (0.5); figure (4) do_plot wxt title ("wxt"); pause (0.5);