|
From: Petr M. <mi...@ph...> - 2009-02-16 14:29:01
|
> > User/script writes in a portable and elegant way:
> > set term screen title 'hello'
> > set term screen 4
> > set term screen 5 size 400,400
>
> set macros
> screen = GPVAL_TERM
> ...
> set term @screen title 'hello'
> set term @screen 4
> set term @screen 5 size 400,400
Good idea. That's actually the solution working in both gnuplot 4.2 and 4.3.
> Another possibility is to have the "set term" command accept
> the terminal name as a string.
> screen = "x11"
> set term screen 5 size 400,400
Cool, your patch (committed to cvs) works fine.
However, I think that the keyword should have preference, not string
variables:
gnuplot> gif='figure.gif'
gnuplot> set out gif
gnuplot> set term gif
^
unknown or ambiguous terminal type; type just 'set terminal' for a list
or with "po" variable (abbreviation of "postscript").
***
I think it may be useful to define
GPVAL_TERM_DEFAULT
to the default startup terminal name, i.e. the same as the default "pushed"
terminal. Then we will have e.g.
GNUTERM = "wxt"
GPVAL_TERM_DEFAULT = "x11"
GPVAL_TERM = "postscript"
Then, external programs (Octave) could use either
set macros; screen=GPVAL_TERM
set term @screen ...options...
on 4.2 or
set term GPVAL_TERM_DEFAULT ...options...
on 4.3.
---
PM
|