set grid y set yrange [30:70] set label sprintf("Channel %g",channel+1) at graph 0.95, 0.1 right f(x)=a*x+b fit f(x) datafile index channel u 2:1 via a,b set xrange [a*30+b:a*70+b] #fit doesn't converge the other way round a=1/a b=-b*a plot datafile index channel using 1:2 title "bla", f(x) pause mouse #weiter bei linker if(MOUSE_KEY==1) channel=channel+1 #zurueck bei rechter if(MOUSE_KEY==3) channel=channel-1 #Ende bei mittlerer if(MOUSE_KEY==2) channel=channel+99 if(channel<21) reread