|
From: Mojca M. <moj...@gm...> - 2006-08-24 11:42:16
|
On 8/21/06, Ethan Merritt wrote:
> On Monday 21 August 2006 02:17 pm, Mojca Miklavec wrote:
> > 1.)
> > is there a way to get the default terminal settings? Postscript
> > terminal provides an option "default", but most terminals don't
>
> There is no coherent philosophy at present.
> Several people have proposed that during the next round of
> development (after 4.2) we modify all terminal drivers to have
> "set term <foo> default" option. It sounds reasonable to me.
>
> If you want to get a head start, go ahead and start putting together
> a patch that will convert your favorite terminals over to the new
> system.
I submitted a little patch to add the "default" option to the metapost term=
inal.
I would like to add it to PNG & PDF, but I have no idea how to compile
it properly (and thus I can't test it). I changed the compiler
yesterday (I was using MS Visual Studio - PNGs are crashing with that
compilation, and gave a try to MinGW). The very first time it worked,
but when I recompiled for the second time gnuplot started crashing
again. I have absolutely no clue about makefiles & compilers.
On 8/22/06, Hans-Bernhard Br=F6ker wrote:
> Mojca Miklavec wrote:
> > The most safe way would be to write a single script for each input
> > (which is what is done now), but that influences efficiency
> > considerably (think of calling gnuplot 30 times versus calling gnuplot
> > only once with 30 plot commands and perhaps a few changes of the
> > terminal and output file inbetween).
>
> Huh? What does having separate scripts have to do with running a
> completely new instance of gnuplot for each script?
I didn't understand your question, but the two alternatives I had in
mind were the following:
option A
----------
file1.plt:
set term png default
set term png transparent
plot sin(x)
set term png default
plot cos(x)
> gnuplot file1.plt
option B
----------
file1.plt
set term png transparent
plot sin(x)
file2.plt
set term png
plot cos(x)
> gnuplot file1.plt
> gnuplot file2.plt
The second option is considerably slower when dealing with lots of plots.
> > Example:
> > the user selects PNG terminal and wants the first figure to be
> > transparent and the second one to use "default" values (whatever they
> > are, notransparent in that case).
>
> Then the user should have a look at 'set term push' and 'set term pop',
> and maybe at 'save terminal', too.
set term push/pop preserve old terminal settings.
set term png transparent
set pop
set term png
will still result in "transparent".
"save terminal" (the option which I didn't know so far) does almost
exactly the thing that I want, but reading and writing from files when
things could be solved in another way is also an additional overhead.
There is also one additional issue (buglet perhaps?).
set term png
save terminal 'a.dat'
set term png transparent
load 'a.dat'
will keep transparent option since "notransparent" is not written to
the file and thus not reset when loading that file.
On 8/22/06, Hans-Bernhard Br=F6ker wrote:
> Petr Mikulik wrote:
> > Shouldn't we provide a "dummy" command 'set termoptions' right now, wit=
h
> > a proper implementation for postscript only (if possible), and with
> > implementation for other terminals after 4.2?
>
> What do you mean by "should we provide" it? "set termoption" already
> exists as a command, and has done for about 2 years at last, now.
So perhaps it's only "set termoption default" the one that is missing?
Mojca
|