From: Xaver W. <xav...@we...> - 2009-01-11 12:30:44
|
Hi, I'm a newbie to python programming, so I hope this is not a dumb mistake of mine ;-) I am trying to plot large negative numbers, with 9 digits after the ., via python (version 2.5.2-3) and python-gnuplot, version 1.8-1 (both Debian Sid packages), on terminal 'dumb', so ascii output. But it occurs to me that whenever I plot them from a (float or string) python list (g.plot(Gnuplot.Data(list)), gnuplot is plotting a wrong number. Plotting a file (g.plot(Gnuplot.File('file.plt')) however works. Look at this example: I "zoomed in" to the first value here (the ascii formatting is lost due to the email, but I think you can see the problem; look at the asterisk psoition and y axis numbers!): (12:55:03)xaver@siduxbox:~/Programme/python$./gw-minimal2.py test_real.log 39 cycles and -902.904164954 Hartree written to list of energies. 5 cycles and -902.912462667 Hartree written to list of energies. 6 cycles and -902.921650947 Hartree written to list of energies. 6 cycles and -902.927426487 Hartree written to list of energies. 6 cycles and -902.930537069 Hartree written to list of energies. 6 cycles and -902.933026922 Hartree written to list of energies. 21 cycles and -902.935555041 Hartree written to list of energies. 6 cycles and -902.937610935 Hartree written to list of energies. 6 cycles and -902.939101838 Hartree written to list of energies. 6 cycles and -902.94003734 Hartree written to list of energies. 6 cycles and -902.94119645 Hartree written to list of energies. 6 cycles and -902.942518852 Hartree written to list of energies. 15 cycles and -902.944932326 Hartree written to list of energies. 6 cycles and -902.947591728 Hartree written to list of energies. 6 cycles and -902.949241052 Hartree written to list of energies. 6 cycles and -902.950658896 Hartree written to list of energies. 6 cycles and -902.951400948 Hartree written to list of energies. 6 cycles and -902.952198923 Hartree written to list of energies. list_scf is [[39, -902.90416495399995], [44, -902.912462667], [50, -902.92165094699999], [56, -902.92742648700005], [62, -902.93053706900002], [68, -902.93302692199995], [89, -902.93555504100004], [95, -902.93761093499995], [101, -902.93910183800006], [107, -902.94003734], [113, -902.94119645000001], [119, -902.94251885200003], [134, -902.94493232599996], [140, -902.94759172800002], [146, -902.94924105200005], [152, -902.95065889600005], [158, -902.95140094800001], [164, -902.95219892299997]] list_scf[0][1] is -902.904164954 Plotting float values: Energy/Hartree -902.904174810 ++-----+-------+------+-------+------+------+-------+-----++ + + + + + SCF Optimization +.*..+ + | : | | : | -902.904174808 ++ : ++ | : | | : | -902.904174806 ++ : ++ | : | | * | | | -902.904174804 ++ ++ | | | | -902.904174802 ++ ++ | | | | + + + + + + + + + -902.904174800 ++-----+-------+------+-------+------+------+-------+-----++ 20 40 60 80 100 120 140 160 180 Cycles Plotting plt file: Energy/Hartree -902.904164960 ++-----+-------+------+-------+------+------+-------+-----++ + + + "test_real.log.plt" using 1:2 +.*..+ + | : | | : | -902.904164958 ++ : ++ | : | | : | -902.904164956 ++ : ++ | : | | : | | : | -902.904164954 ++ * ++ | | | | -902.904164952 ++ ++ | | | | + + + + + + + + + -902.904164950 ++-----+-------+------+-------+------+------+-------+-----++ 20 40 60 80 100 120 140 160 180 Does anyone know what's wrong here? I can put all files on the net somewhere, if that helps. Thanks in advance, X. W. |