|
From: | Tamas Nepusz |
Subject: | Re: [igraph] Plot.show() on windows |
Date: | Fri, 25 Apr 2008 18:25:54 +0200 |
Hi,
Well, the igraph plotting facility has not been tested too much on Windows ;) Since I mostly use OS X, I only tried it in a virtual machine before release and it worked there.If I change fig.show() to fig.save("test.png") it works. Anyone has a clue on what could be the problem?
The only difference between fig.show() and fig.save(whatever) is that the former one tries to create a temporary file somewhere, start the Windows Picture and Fax Viewer to view it and then delete the temporary file. It looks like igraph either incorrectly detects the temporary directory where it tries to put the PNG file or you don't have writing permission to that directory. After having received the IOError, you might try printing fig._tmpfile_obj or fig._tmpfile_obj.name to figure out where did it try to save the picture.
On second thought, I remember having fixed a bug like this after the release of igraph 0.5. Since 0.5.1 has not been released yet, you might try modifying drawing.py in the igraph Python interface source by hand. The patch is here:
http://cneurocvs.rmki.kfki.hu/cgi-bin/archzoom.cgi/address@hidden/igraph--main--0.5--patch-394/interfaces/python/package/drawing.py.diff?diffLines that have to be removed are denoted by red, new lines that were added are blue.
Best, -- Tamas
[Prev in Thread] | Current Thread | [Next in Thread] |