Mercurial > hg > octave-lyh
diff scripts/plot/figure.m @ 4790:91a84c9bdadb
[project @ 2004-02-19 20:15:17 by jwe]
author | jwe |
---|---|
date | Thu, 19 Feb 2004 20:15:18 +0000 |
parents | f8dde1807dee |
children | 14027e0bafa4 |
line wrap: on
line diff
--- a/scripts/plot/figure.m +++ b/scripts/plot/figure.m @@ -39,12 +39,16 @@ if (nargin < 2) if (gnuplot_has_frames) - if (! isempty (getenv ("DISPLAY"))) + gnuterm = getenv ("GNUTERM"); + if (isempty (gnuterm) && ! isempty ("DISPLAY")) + gnuterm = "x11"; + endif + if (! isempty (gnuterm)) oneplot (); figure_list = union (figure_list, f); - eval (sprintf ("gset term x11 %d\n", f)); + eval (sprintf ("gset term %s %d\n", gnuterm, f)); else - error ("figure: requires X11 and valid DISPLAY"); + error ("figure: requires GNUTERM (Aqua) or DISPLAY (X11)"); endif else error ("figure: gnuplot doesn't appear to support this feature");