Thanks Ricardo,

I have reversed the axes:

<hansl>
matrix d_1 = kdensity(Water)
matrix d[,1] = d_1[,2]
matrix d[,2] = d_1[,1]
<hansl>

Now its ok. I think that the orders in the commmand kdensity are reversed, or the gnuplot command use the information in the matrix that Gretl create in reverse form (column 1 in the x axes and column 2 y axes, when it should be otherwise). Please check the two figures attached.

With this transformation, everything looks fine.

Thanks a lot for the answers and the change in the program

Gretl is the best!

Leandro



2014-01-28 Riccardo (Jack) Lucchetti <r.lucchetti@univpm.it>
On Tue, 28 Jan 2014, Leandro Zipitria wrote:

Dear all,

First, I have checked the CSV and confirm that now the kernel works as
expected.
Thanks all for the help.
Just to add that the information is plotted reversed (the data generated
for the kernel approximation is reversed in the matrix), I attach the file
generated.

Whoops, youre right. Use this:
<hansl>
gnuplot 2 1 --matrix=d --with-lines --output=pruba.eps --suppress-fitted
</hansl>



-------------------------------------------------------
  Riccardo (Jack) Lucchetti
  Dipartimento di Scienze Economiche e Sociali (DiSES)

  Universitą Politecnica delle Marche
  (formerly known as Universitą di Ancona)

  r.lucchetti@univpm.it
  http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------