On Sun, 16 Oct 2011, artur bala wrote:

> Is there a way to plot in the same graph pairwise series (xi, yi)?
> I'm thinking to something like this:
> list X = x1 x2
> list Y = y1 y2
> gnuplot Y X         # plotting (x1,y1) and (x2,y2)

gretl's interface to gnuplot supports only a single x axis, 
and a single x variable. But you can write a graph 
specification for gnuplot that uses 2 x variables, and 2 x 
axes if you wish.

Dump your data into a plain text file, e.g.

# y1 x1 y2 x2
  2 1 1000 100
  4 2  800 200
  6 3  600 300
  8 4  400 400
10 5  200 500

and do the plot something like this:

<gnuplot>
set ytics nomirror
set y2tics
set xtics nomirror
set x2tics
plot 'twindata' using 1:2 axes x1y1 , \
  'twindata' using 3:4 axes x2y2
</gnuplot>

Note that you have a gnuplot editor available in gretl under
/File/Script files/New script/gnuplot script.

Allin Cottrell

Reply via email to