From: Michael H. <mh...@al...> - 2009-01-11 14:54:06
|
Xaver Wurzenberger wrote: > 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. > [...] > > list_scf[0][1] is -902.904164954 The Gnuplot.py library uses float (i.e., single-precision) arrays to store values internally. When your value is rounded to single-precision, it results in the number that is actually plotted. IIRC you can get around this by passing a numpy double array to the plot() method; I think that the library leaves the values as double precision in this case. Michael |