Last month I announced the existence of a --band option for the
"gnuplot" and "plot" commands -- see
http://lists.wfu.edu/pipermail/gretl-users/2016-May/011846.html
Since then, Jack and I have considered this more carefully, and the
next gretl release (due out within a week) will incorporate a
modified version of this option. The new version is more functional
than the previous one, and moreover it is designed to allow future
extensions in case we decide it's worth supporting more complex
variants.
So here's the current situation: the "band" information is spread
across two options, --band and --band-style. The syntax is as
follows:
(1) --band wants either 2 or 3 comma-separated arguments: the
"center" of the band (which may or may not be plotted in its own
right), the "width" of the band (e.g. a series holding standard
errors) and, optionally, a multiplier (e.g., number of standard
errors). If the third argument is omitted it defaults to 1.0.
So suppose you have series yhat and se_yhat and you'd like to plot
yhat along with a band at yhat plus-and-minus 1.96 se_yhat; then the
option would be
--band=yhat,se_yhat,1.96
However, if your second series is already expressed as suitable
multiples of standard errors (call it "maxerr") you could do:
--band=yhat,maxerr
(2) --band-style wants either 1 or 2 arguments (comma-separated if
you give two). The first may be either "line", "dash" or
"fill", to
represent the band by enclosing lines or dashes, or by a shaded
area. The default, if this argument is omitted, is "line". The
second is a hexadecimal RGB color specification: for example
0xff0000 means red. Examples:
--band-style=fill # shaded area using default color
--band-style=dash,0x0000ff # blue dashes
--band-style=0xdddddd # grey lines
If you want the center of the band to be plotted in its own right
you should give that as an argument to the "gnuplot" command. Here's
a simple example:
gnuplot yhat --band=yhat,se_yhat,2 --with-lines
This mechanism also works with the "plot" command-block:
list P = yhat # add more series if you like
plot P
options band=yhat,se_yhat,2 band-style=0xdddddd
option with-lines
end plot --output=display
It also works when plotting columns of a matrix. However, in this
case the columns to be plotted in their own right are given in one
named matrix and the (center,width) of the band are given in a
second named matrix with two columns. Example:
matrix MP = {yhat} # plot more columns if you wish
matrix B = {yhat,se_yhat}
plot MP
options band=B,1.96 band-style=0xdddddd
option with-lines
end plot --output=display
Allin Cottrell