Gnuplot.py and, _by far_, the weirdest thing I've ever seen on my computer

Paul Cochrane cochrane at esscc.uq.edu.au
Mon Apr 4 21:05:43 EDT 2005


I had similar problems with Gnuplot.py, basically, one couldn't use ascii
mode for plotting grid data, and had to set binary=1 in the GridData() 
method.  (this is off the top of my head, so I might have the binary/ascii
thing the wrong way around).  What fixed the problem was going to version
Gnuplot.py 1.7.  What version are you using?  If it's 1.6, that *might* be
the problem (although, I can't be 100% sure).

HTH

Regards,

Paul


* syd (syd.diamond at gmail.com) [050405 07:26]:
> I don't even know where to begin.  This is just bizarre.  I just picked
> up the Gnuplot.py module (a light interface to gnuplot commands) and
> was messing around with it today.
> 
> I've got a tiny script, but it only works from the command line about
> half the time!  In the python interpreter, 100%.   Ipython, 100%.  I'm
> not kidding.
> 
> #!/bin/env python
> import Gnuplot
> g = Gnuplot.Gnuplot(debug=1)
> g.title('A simple example')
> g('set data style linespoints')
> g('set terminal png small color')
> g('set output "myGraph.png"')
> g.plot([[0,1.1], [1,5.8], [2,3.3], [3,100]])
> 
> Here's just one example -- it does not work, then it works.  It seems
> totally random.  It will work a few times, then it won't for a few
> times...
> 
> bash-2.05b$ ./myGnu.py
> gnuplot> set title "A simple example"
> gnuplot> set data style linespoints
> gnuplot> set terminal png small color
> gnuplot> set output "myGraph.png"
> gnuplot> plot '/tmp/tmp5LXAow' notitle
> 
> gnuplot> plot '/tmp/tmp5LXAow' notitle
>               ^
>          can't read data file "/tmp/tmp5LXAow"
>          line 0: util.c: No such file or directory
> 
> bash-2.05b$ ./myGnu.py
> gnuplot> set title "A simple example"
> gnuplot> set data style linespoints
> gnuplot> set terminal png small color
> gnuplot> set output "myGraph.png"
> gnuplot> plot '/tmp/tmpHMTkpL' notitle
> 
> (and it makes the graph image just fine)
> 
> I mean what the hell is going on?  My permissions on /tmp are wide open
> (drwxrwxrwt).  It does the same thing when I run as root.  And it
> _always_ works when I use the interpreter or interactive python.
> 
> Any clues would be greatly appreciated.  I'm baffled.
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list

-- 
Paul Cochrane
Computational Scientist/Software Developer
Earth Systems Science Computational Centre
Rm 703, SMI Building
University of Queensland
Brisbane
Queensland 4072
Australia




More information about the Python-list mailing list