Hi, I'm not an expert of scipy, but you might perform the fit using scipy, and then pass all to gnuplot.
http://www.scipy.org/Cookbook/FittingData
lorenzo
--- Sab 12/11/11, Krzysztof Berniak <krz...@gm...> ha scritto:
Da: Krzysztof Berniak <krz...@gm...>
Oggetto: [Gnuplot-py-users] export output from gnuplot to python
A: gnu...@li...
Data: Sabato 12 novembre 2011, 17:43
Hi all,
I'm writing script in python, which fitting exponencial curve to data ( f(x) = a*exp(x*b).To this problem, I use gnuplot in my script. Gnuplot display parameters ( a +/- delta a; b +/- delta b)
How Can I use/save this parameters in python variables in next steps of my script,
def main(): ... plot = Gnuplot.Gnuplot()
plot('f1(x) = a1*exp(b1*x)') plot('a1 = 300; b1 = 0.005;') plot('fit f1(x) "data.txt" using 1:2 via a1, b1') print "first parameter", a1
print "second parameter", b1 # is it feasible ? Or there is another way to see the results ( parameter a1 and b1) of gnuplot by python
#plot('set terminal postscript') #plot('set output "output.ps"')
regards and please help,
Cristopher
-----Segue allegato-----
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
-----Segue allegato-----
_______________________________________________
Gnuplot-py-users mailing list
Gnu...@li...
https://lists.sourceforge.net/lists/listinfo/gnuplot-py-users
|