|
From: Ethan M. <merritt@u.washington.edu> - 2005-03-25 05:32:12
|
On Tuesday 22 March 2005 05:46 am, Hans-Bernhard Broeker wrote:
> Ethan Merritt wrote:
> > I want to plot a contour map with several explicit paths
> > superimposed on it.
>
> .. you didn't mention the usually recommended method: doing it via 'set
> term table' to put the contours into a file, then plotting that along
> with whatever else you want, in a single 'splot' or 'plot' commands.
I didn't mention it because it doesn't work in general, and has never
worked in general. It works only if the current terminal is both
interactive and stateless. The sequence
set term push; set term table; plot ...; set term pop;
trashes the original terminal state and the output file state.
That's why we haven't been able to include vector.dem in `make check`
and why that demo doesn't work for most terminals in the first place.
It makes no sense for the tabular output to be considered as a
terminal type anyhow. The core code makes not a single call to the
dummied-up terminal driver entries.
So I have removed "table" as a terminal type altogether, and replaced
it with a pair of commands
set table {"outfile"}
...
unset table
This allows you to dump tabular output without perturbing the current
terminal state. If no explicit outfile is given, the tabular output goes
to gpoutfile. As a sop to backwards compatibility, the command
'set term table' is trapped and translated to 'set table'.
This doesn't make old scripts work any better than before, but if you
did have a working script then it should continue to work. However,
it will work better if you upgrade it to use the new commands instead
of fooling with the terminal type.
As a result of this change, vector.dem now works for all terminal types
and also works from non-interactive scripts. So I have added it back
to all.dem and 'make check'.
There is still some minor cleanup work needed to remove table.trm
from the configuration and make files. Otherwise I think this turned
out to be a straightforward fix for a longstanding problem.
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington 98195-7742
|