I have two data sets x,y
, x1,y1
. I want to plot them all in one figure.
require 'gnuplot'
local x,y,x1,y1 = unpack(data)
gnuplot.xlabel('PPL')
gnuplot.ylabel('Epoch #')
gnuplot.plot({x,y},{x1,y1})
This works well, but I'd like to have straight lines instead of dotted lines. Also, I want to include a legend in top right corner. Alas, whatever combination I tried, it does not work.
gnuplot.plot({x,y},{x1,y1},'-')
gnuplot.plot('1','2',{x,y},{x1,y1},'-')
gnuplot.plot({'1','2',{x,y},{x1,y1},'-'})
How can I plot two lines and add a legend in one figure with gnuplot?