El 20/11/15 a las 12:18, Ignacio Diaz-Emparanza escribió:
I looked at your examples in the wiki. The "slow easy way"
works OK.
But in the "fast easy way" I only obtain the .plt file. I miss a way
to run gnuplot from inside gretl and put the .tex files in the correct
place.
My script is
<hansl>
open AWM --quiet
series tbal = XTN - MTN
list X = XTN MTN tbal
plot X
literal set terminal lua tikz createstyle
literal set output "tradebal.tex"
option with-boxes=tbal
literal set key below
options time-series with-lines
end plot
</hansl>
But this only creates a file 'gpttmp01.plt' in my working directory.
I tried several ways of running gnuplot to create the .tex files in
the correct place, but I had no much success. The best of them is just
to add --output=display in the last line
'end plot --output=display'
but, of course, this gives an error in the screen "El archivo de
imagen «/home/ignacio/.gretl/gretltmp.png» no contiene datos" because
gretltmp.png is not created and the .tex files are not placed in my
workdir, but in my home directory.
Sorry I just sent the previous message and then got a partial solution
to these problems. If you put the line
literal cd "@workdir"
(or whatever directory you prefer) as the first one in the plot
environment, all the .tex files go this directory.
Ir remains the question of how to run smoothly gnuplot on an input file
without receiving errors (and only run). A possibility is to allow for
shell commands and run
!gnuplot gpttmp01.plt
but this is not very smart. May I suggest a new option to gnuplot gretl
command (and plot environment) --output=run?
--
Ignacio Díaz-Emparanza
Departamento de Economía Aplicada III (Econometría y Estadística)
Universidad del País Vasco - Euskalherriko Unibertsitatea, UPV/EHU
Tfno: (+34) 94 601 3732
http://www.ehu.eus/ea3