Gnuplot: multiple plot with Y axis shift ?
Posted: Tue Aug 20, 2013 2:54 am
Hello,
need help with GnuPlot. I'm trying to plot multiple spectra but shift each of them on the Y-axis. I'm using the command "using 1:($2+n)" but this doesn't work... what I'm missing in the syntax there???
Here is the result I get:
And here is the code of my script, based on ISIS std2.gnu:
Thank for the help!
Olivier
need help with GnuPlot. I'm trying to plot multiple spectra but shift each of them on the Y-axis. I'm using the command "using 1:($2+n)" but this doesn't work... what I'm missing in the syntax there???
Here is the result I get:
And here is the code of my script, based on ISIS std2.gnu:
Code: Select all
#============================================================
# GnuPlot script : STD_novaX.GNU
#============================================================
# Plot nova spectra (one per night) in one graph
#============================================================
# --------------------------------------
# Setting
# --------------------------------------
set xlabel "Wavelength (A)"
set ylabel "Relative intensity"
set xrange [3676:7350]
set yrange [0:15]
set tmargin 2
set title 'Nova Del 2013 - 20130814-20(TV85 + Alpy 600 + Atik460; O. Thizy)' offset 0,-0.5
set terminal push
# ------------------------------------
# Plot on the computer screen
# ------------------------------------
set terminal windows "Arial" 9
plot '_novadel2013_20130814_993_othizy.dat' using 1:($2+10) title "20130814_993" with lines lc rgb 'blue',\
'_novadel2013_20130815_913_othizy.dat' using 1:($2+8) title "20130815_913" with lines lc rgb 'red',\
'_novadel2013_20130816_862_othizy.dat' using 1:($2+6) title "20130816_862" with lines lc rgb 'green',\
'_novadel2013_20130817_988_othizy.dat' using 1:($2+4) title "20130817_988" with lines lc rgb 'yellow',\
'_novadel2013_20130818_874_othizy.dat' using 1:($2+2) title "20130818_874" with lines lc rgb 'purple',\
'_novadel2013_20130819_985_othizy.dat' title "20130819_985" with lines lc rgb 'black'
# ------------------------------------
# Plot on a PNG file
# ------------------------------------
set terminal png small size 1200,800
set output 'nova.png'
replot
# ------------------------------------
# Finalize
# ------------------------------------
set output
set terminal pop
reset
Thank for the help!
Olivier