From: iCy-fLaME <icy...@gm...> - 2006-11-16 19:15:16
|
This is how I init my Gnuplot objects: >>> import Gnuplot >>> p = Gnuplot.Gnuplot(debug = 1) gnuplot> set terminal x11 >>> p('set data style line') gnuplot> set data style line >>> g = Gnuplot.Gnuplot(debug=1) gnuplot> set terminal x11 >>> g('set view map') gnuplot> set view map >>> g('unset surface') gnuplot> unset surface >>> g('set style data pm3d') gnuplot> set style data pm3d >>> g('set pm3d at b') gnuplot> set pm3d at b Then have: out => 2D numpy array xlst => 1D numpy array ylst => 1D numpy array If I do: >>> p.plot(flst) gnuplot> plot '/tmp/tmpuASWPU' notitle >>> g.splot(Gnuplot.GridData(out, xlst, ylst)) gnuplot> splot '/tmp/tmpqE8TME' binary notitle >>> line 0: File doesn't factorize into full matrix Hummm..... error. and if I do: >>> g.splot(Gnuplot.GridData(out, xlst, ylst, binary = 0)) gnuplot> splot '/tmp/tmpULSoZm' notitle Ahh... takes longer, but fixed. Sounds like incompatibility for the numpy (2D) array object. Here is what I am using: >>> Gnuplot.__version__ '1.7' >>> numpy.__version__ '1.0' >>> Numeric.__version__ '24.2' All suggestions are welcome. -- iCy-fLaME ------------------------------------------------ The body maybe wounded, but it is the mind that hurts. |