I would like to put the legend of each plot outside on the top of them. I'm using multiplot ,so the problem is that when i try to do this all the legends end up at the top of the figure. How can I put each legend on top of the corresponding plots ? Hers is a sample of my code
reset
set datafile separator comma
set term pdfcairo enhanced font "Helvetica,7" size 4,7
set output "data.pdf"
set multiplot layout 6,2 margins 0.07, 0.95, 0.05, 0.97 spacing 0.1,0.05
set tics nomirror
set grid xtics ytics lt 1 lw 0.5 lc rgb "grey"
############################################ PLOT
set key outside horizontal
set ylabel "V [mV]"
set label "A" at graph -0.14,1.1
plot "data.txt" using "time":"V" with lines
unset label
plot "data.txt" using "time":"V" with lines
unset ylabel
############################################# PLOT
set key outside horizontal
set label "B" at graph -0.14,1.1
set ylabel "I_{tot} [pA/pF] "
plot "data.txt" using "time":"Itotal" with lines
unset ylabel
unset label
unset key
############################################ PLOT
set key outside horizontal
set label "G" at graph -0.16,1.1
set ylabel "J_{rel} [mM/s]"
plot "data.txt" using "time":"Jrel" with lines
unset ylabel
unset label
unset key
unset multiplot
And here is the image produced (by the complete code)




margins 0.07, 0.95, 0.05, 0.97(screen coordinates, not graph coordinates). Skip this and and you will have the key at each plot, however, not with the desired margins. Right away, I don't have a good solution. I will think about it. - theozh