Thanks for this script. The difference is astonishing (using data from my simulations).
-----Ursprüngliche Nachricht-----
Von: gretl-users-bounces(a)lists.wfu.edu [mailto:gretl-users-bounces@lists.wfu.edu] Im
Auftrag von Riccardo (Jack) Lucchetti
Gesendet: Mittwoch, 21. Oktober 2015 15:06
An: Gretl list
Betreff: Re: [Gretl-users] --output="Icon"?, violin-plot option (request)
On Wed, 21 Oct 2015, Schaff, Frederik wrote:
And a feature request (if I may): It would be "nice to
have" a violin
plot option for the boxplots, like the last one from
http://gnuplot.sourceforge.net/demo_cvs/violinplot.html.
The script below could be perhaps useful as a starting point for a nice function package
(hint, hint)
<hansl>
open mroz87
series lwage = ln(WW)
series lage = ln(WA)
k1 = kdensity(lwage)
x1 = k1[,2]
y1 = k1[,1]
a1 = (NA ~ y1) | (y1 ~ NA)
k2 = kdensity(lage)
x2 = k2[,2]
y2 = k2[,1]
a2 = (NA ~ y2) | (y2 ~ NA)
c = mshape(NA, rows(a1) + rows(a2), 4)
c[1:rows(a1),1:2] = a1
c[rows(a1)+1:,3:] = a2
c2 = (x1 | -x1) | (3 .+ (x2 | -x2))
c = c ~ c2
plot c
option with-lines
literal unset key
literal set linetype 1 lc rgb "#000000"
literal set linetype 2 lc rgb "#000000"
literal set linetype 3 lc rgb "#ff0000"
literal set linetype 4 lc rgb "#ff0000"
literal unset xzeroaxis
end plot --output=display
</hansl>
-------------------------------------------------------
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
-------------------------------------------------------