I have been following various tutorials on how to run gnuplot and I have come up with this script. So far it is going well enough but when I try to change the offset on the xlabel or ylabel I get a message saying this in the terminal:
gnuplot> set xlabel "Applied Current [mA]" -0.3
^
line 0: ';' expected
I was wracking my brain so I even tested example xlabel and ylabel off the internet and the same type of error came up
#!/bin/bash
gnuplot << TOEND
# Set the output file
set terminal postscript eps color enhanced
set output 'fp.eps'
unset key
set title "Voltage as a Function of Current"
set noborder
set xtics axis
set ytics axis
set format x "%2.0f"
set format y "%2.0f"
u(x)=m*x+b
fit u(x) "nfp.dat" using 1:2 via m,b
v(x)=m*x+b
fit v(x) "wfp.dat" using 1:2 via m,b
set xzeroaxis linestyle 2 lt 1 lc 0
set xlabel "Applied Current [mA]" -0.3
set yzeroaxis linestyle 2 lt 1 lc 0
set ylabel "Voltage [mV]"
set xrange [ -15.00 : 15.00 ]
set yrange [ -20.0 : 20.0 ]
plot 'nfp.dat' using 1:2, \
v(x), 'wfp.dat' using 1:2, \
'sfp.dat' using 1:2
TOEND
convert -density 100 fp.eps fp.png
I think you are missing the
offsetflag. Try: