corrgm, pergm, qlrtest, xcorrgm, and --outbuf
by Sven Schreiber
Hi everybody,
this is in the batch mode context, executing a hansl script.
A problem with 'corrgm' is that it only produces a real plot (not a
textplot) when the --plot=display option is given; but this is
incompatible with the --outbuf option. If you suppress --plot=display,
then you get a textplot and nothing in your output buffer. Same with
'xcorrgm'.
And similarly with 'pergm'. To get a plot at all, --plot=display is
needed, and again --outbuf is not compatible. ... and 'qlrtest' ...
So how can the --outbuf option actually be used? Presumably by allowing
it to coexist with --plot=display, or perhaps by introducing a new
variant --plot=buffer to be used together with --outbuf=mystring ?
Interestingly, there is _no_ such problem with 'leverage', although the
--plot option appears to work the same way.
thanks
sven
11 months
For-loop over a 'bundled' string array
by Artur T.
Hi all,
Let's say we have a string array 'input'. The first example shows that
the for-loop can be used for printing each element of the array.
However, as the 2nd example shows, if the string array is stored in
bundle B this does not seem to work currently.
I could not find anything in the User's Guide about this restriction. Is
it expected that one cannot print the elements of B.input as can be done
for input itself?
<hansl>
input = defarray("R1", "R2", "R3")
bundle B = _(input)
# Prints each element
loop foreach i input
print "$i"
endloop
# prints only 'B.input'
loop foreach i B.input
print "$i"
endloop
</hansl>
Thanks
Artur
11 months, 3 weeks
the --outbuf option
by Sven Schreiber
Hi everybody,
since 2023b the 'gnuplot' command has an --outbuf option, which is duly
documented. Then I was reminded (or found out) that it also works for
the 'freq' command. (This question is related to the ticket
https://sourceforge.net/p/gretl/feature-requests/191/.) The background
is that the 'freq' command is one of those commands that are not
directly plotting commands, but are able to also produce a plot as "a
side effect". But for 'freq' the --outbuf option isn't documented.
Does this mean that 'freq' and friends just automatically inherited the
outbuf option from the plotting apparatus, or that outbuf is still
experimental in combination with 'freq' (et al.) and not guaranteed to
stay, or simply that the documentation hasn't been added yet?
thanks
sven
1 year
question about plotting input from string buffers
by Sven Schreiber
Hi,
not sure whether the observed behavior (with gretl 2023c) with the
following script is expected:
<hansl>
open denmark
string s
gnuplot LRM --time-series --outbuf=s { set title 'My Title';} # works
gnuplot --inbuf=s --output=display { set title 'My Title';} # fails
</hansl>
Two questions:
- The first gnuplot invocation works, but it also produces a displayed
plot. Is this intended even though the outbuf option is given? I would
have thought that it only writes the output to the string s, not also
displaying something.
- The second gnuplot line yields a parser error. Is the inbuf option
incompatible with further added gnuplot commands?
thanks
sven
1 year
has_string_table for copied series
by Artur T.
Hi all,
I stumbled over the following:
<hansl>
open mrw --quiet
series factor = OECD + 1 # one-based
strings svalues = defarray("non-oecd", "oecd")
stringify(factor, svalues)
series z = factor # just a copy
eval getinfo(factor) # has_string_table = 1
eval getinfo(z) # has_string_table = 0
</hansl>
While for series 'factor' has_string_table = 1, it is zero for the copy
series 'z'.
Is this as expected?
Best
Artur
1 year