dofile("definitions.Quanty") GShift = Spectra.Shift(G, 5.3) G.Print({{"file","Spectra.dat"}}) GShift.Print({{"file","Spectra.Shift.dat"}}) gnuplotScript = gnuplotHead .. [[ set output "Spectra.Shift.ps" plot "Spectra.dat" using 1:(-$3 ) title 'T1' with lines ls 1,\ "Spectra.Shift.dat" using 1:(-$3) title 'T1 shifted' with lines ls 2 ]] file = io.open("Spectra.Shift.gnuplot", "{{ :documentation:language_reference:objects:spectra:functions:spectra.shift.png?nolink |}}w") file:write(gnuplotScript) file:close() os.execute("gnuplot Spectra.Shift.gnuplot") os.execute("convert -density 1024 Spectra.Shift.ps -resize 1024 Spectra.Shift.png")