Mercurial > octave-nkf
comparison scripts/plot/drawnow.m @ 6419:73fcbac81f33
[project @ 2007-03-20 17:18:24 by jwe]
author | jwe |
---|---|
date | Tue, 20 Mar 2007 17:18:24 +0000 |
parents | 2efe282221ed |
children | 0cc5ca7b1e91 |
comparison
equal
deleted
inserted
replaced
6418:2efe282221ed | 6419:73fcbac81f33 |
---|---|
44 cmd = gnuplot_binary (); | 44 cmd = gnuplot_binary (); |
45 if (gnuplot_use_title_option ()) | 45 if (gnuplot_use_title_option ()) |
46 cmd = sprintf ("%s -title \"Figure %d\"", cmd, h); | 46 cmd = sprintf ("%s -title \"Figure %d\"", cmd, h); |
47 endif | 47 endif |
48 plot_stream = popen (cmd, "w"); | 48 plot_stream = popen (cmd, "w"); |
49 if (isempty (__go_close_all_registered__)) | |
50 atexit ("__go_close_all__"); | |
51 __go_close_all_registered__ = true; | |
52 endif | |
53 if (plot_stream < 0) | 49 if (plot_stream < 0) |
54 error ("drawnow: failed to open connection to gnuplot"); | 50 error ("drawnow: failed to open connection to gnuplot"); |
55 else | 51 else |
56 set (h, "__plot_stream__", plot_stream); | 52 set (h, "__plot_stream__", plot_stream); |
57 if (isunix () && isempty (getenv ("DISPLAY"))) | 53 if (isunix () && isempty (getenv ("DISPLAY"))) |
58 fprintf (plot_stream, "set terminal dumb\n;"); | 54 fprintf (plot_stream, "set terminal dumb\n;"); |
55 endif | |
56 if (isempty (__go_close_all_registered__)) | |
57 atexit ("__go_close_all__"); | |
58 __go_close_all_registered__ = true; | |
59 endif | 59 endif |
60 endif | 60 endif |
61 endif | 61 endif |
62 | 62 |
63 if (nargin == 2) | 63 if (nargin == 2) |