Am 25.05.2018 um 20:19 schrieb Sven Schreiber:
Am 25.05.2018 um 20:06 schrieb Andreas Zervas:
> P.S. I originally started coding with octave because gretl does
not
> offer a facility to produce subplots
will boil down to putting together a function package, I would be
optimistic that the ETA is this year, but more pessimistic about this
summer.
Well actually I thought today that I need this myself, so I'm attaching
a first attempt which so far works for me. (So far it's a plain
function, not a package.)
The first arguments for this function 'multiGplot' are these:
1) Array of strings with the details for the plotting command - so the
stuff that comes right behind the 'gnuplot' keyword.
2) A string with (double-dash) options that all subplots have in common.
3) A gretl list with all the series inputs that are referenced in the
individual gnuplot commands. (Can use shortcut 'deflist(dataset)' for
smaller datasets.)
4) Integer with the number of columns in the plot grid. (Optional,
default 1.)
5) A string with a file/path name to determine gnuplot's output, in
parallel to the display output. (Optional, default none/null.)
Examples (referring to the denmark.gdt data):
multiGplot(defarray("LRM --time-series --with-lines", \
"LRY --time-series --with-lines"), null, \
deflist(dataset))
or more compactly:
multiGplot(defarray("LRM", "LRY"), "--time-series
--with-lines", \
deflist(dataset))
Of course the string array and the list can also be predefined and
named, instead of this anonymous usage.
The function returns a string with the produced gnuplot plot source for
further use, if needed.
I've also thought if instead of (or in addition to) the list input a
bundle should be used which could also hold matrices and such things.
Comments on this and other aspects are welcome. Bugs are surely there.
cheers,
sven