Essentially, the problem that I am experiencing is that the legend overlaps the gnuplot graph that I am trying to plot as illustrated in the following diagram.
If you want to turn it off altogether:
gnuplot> set nokey
If you want to move the legend, you can do this with
gnuplot> set key left top
to move it to the top left. If you want to give the lines more meaningful names in the legend, use the title
keyword when generating the plot:
gnuplot> plot "datafile1.txt" using 2:4 with lines title "data",
....