A new example in the User's Guide is always more then welcome,
new gretl release or not ;))
Quoting "Riccardo (Jack) Lucchetti" <r.lucchetti(a)univpm.it>:
Folks,
I need to generate a time-series picture with NBER-style recession
bands. This is very easy to do via the GUI, but not very much so
from a script. So I put together the following function, that has a
few flaws but gets the basic job done:
<hansl>
function void plot_with_band(list X, series band)
smpl X band --contiguous
scalar y0 = min(min(X))
scalar y1 = max(max(X))
scalar m = (y1+y0)/2
scalar w = (y1-y0)/1.5
series band_w = band ? w : 0
series band_c = band ? m : NA
band_c[$t1] = m
band_c[$t2] = m
plot X
options time-series with-lines
options band=band_c,band_w,1 band-style=fill
end plot --output=display
end function
### example
open AWM17
series band = (t > 1990:1) && (t<1994:4) || (t > 2000:1) &&
(t<2004:4)
list X = CAN_YEN URX
plot_with_band(X, band)
</hansl>
Now, I can see three possibilities:
* just add this example to the User's Guide * refine the function
and make it a function package
* enhance the gnuplot command and the plot block with special syntax
I would find number 3 preferable, if we weren't just before release,
and I don't really feel like pushing release ahead for this. But
OTOH, if we decide to put this off for gretl 2019c, then options 1
and 2 are not really worthwhile, are they?
Ideas?
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
************************************************************
Francesca Di Iorio
Dipartimento di Scienze Politiche
Universita' di Napoli Federico II
via L. Rodino' 22
I-80138 Napoli
tel. 081-2538280
fax. 081-2537466
e-mail fdiiorio(a)unina.it