Benutzer-Werkzeuge

Webseiten-Werkzeuge


gnuplot:start

Dies ist eine alte Version des Dokuments!


gnuplot

Schleifen

schleife.plt
channel = 0
datafile = 'zeuch.txt'
load 'bla.plt'
bla.plt
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

Zwei verschiedene y Achsen

zwei_achsen.plt
set y2tics
set ytics nomirror
 
set angles degree
 
tstart=9.2
tstop=12.8
 
g(x)=b
 
fit g(x) data using ($1>tstart && $1<tstop?$1:1/0):(atan(($3-0.007)/($2+0.073))) via b
 
 
plot data_other using 1:2 axes x1y2 with dots title 'other data', \
     data u 1:(atan(($3-0.007)/($2+0.073))) w d t 'data', g(x)

Mehrere Plot Fenster

(in einer Schleife… siehe schleifen)

mehrere_fenster.plt
plotnr=0
set term x11 plotnr
 
plot bla index plotnr
 
plotnr=plotnr+1

Höhere Auflösung

Zeiten/Datum auf einer Achse verwenden

Datum
set xdata time
set timefmt "%d.%m.%y"
set format x "%m.%y"

Histogramm

(Gnuplot übernimmt das Binning!)

histogramm.plt
binwidth=0.5
bin(x,width)=width*floor(x/width)
plot 'data' u (bin($6,binwidth)):(1.0) smooth freq with boxes

Plot Fenster

Befehle

mit h abrufen (zB a → autoscale, r → ruler,…)

gnuplot/start.1298630506.txt.gz · Zuletzt geändert: 2011/02/25 11:41 von quirxl

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki