Dear Allin,

my fault, my command was
gnuplot  --matrix=d --with-lines

instead of:
gnuplot 2 1 --matrix=d --with-lines

Now I realize that with the 2 1 Gretl rearrange the plot in the right wat.

Just one final question, is there any option to add a title to a plot using the gnuplot command?

Thanks
Leandro



2014-01-28 Allin Cottrell <cottrell@wfu.edu>
On Tue, 28 Jan 2014, Leandro Zipitria wrote:

> 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).

The matrix itself is fine, the columns being x, f(x). The thing is that
gnuplot expects the y-axis variable(s) to be given first, then x (this is
in the help for the "gnuplot" command).

Maybe if you use "gnuplot" on a two-column matrix without giving a list
for the column order we should assume the matrix is in x, y order and
therefore reverse the columns for gnuplot's benefit? I'm not sure if that
would break any build-in uses of gnuplot in gretl.

Allin Cottrell
_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users