# Complex networks

I'm trying to create a .ps image -- 762x190px -- representing a complex
multi-layered network -- example of multi-layered network: the first
picture on the right at the web-page https://networkx.lanl.gov/ -- where
nodes have different colours, namely all the rainbow colours.
At the present the situation it's quite problematic.
I'm able to draw, using networkx and matplotlib, simple networks like
the red ones available at the page
http://sourceforge.net/project/screenshots.php?group_id=122233.
On the contrary, I'm not able to draw multi-layered networks where nodes
have different colours. Furthermore, I'm not able to settle the image
size. Can you help me please? Many thanks.
nic

Hopefully someone here will be able to help you, but you may have more luck asking on the networkx mailing list:

Ken

···

On Jan 8, 2006, at 1:19 PM, Giandomenico Sica wrote:

I'm trying to create a .ps image -- 762x190px -- representing a complex
multi-layered network -- example of multi-layered network: the first
picture on the right at the web-page https://networkx.lanl.gov/

The following script:

···

_________________________
from pylab import *
fig1=figure(1)
plot([0,1],[0,1])
xlabel(r'$c_p \overline{w^\prime\,\theta_v^\prime}\ \mathrm{(W\,m^{-2})$')
#xlabel(r'$c_p \overline{w^\prime\,\theta_v^\prime}$')
savefig('bug.ps')
_________________________

fails for me with the popup message:

"Failed to save
Error message: [Errno 2] No such file or directory:
'aa457a9c63ca3a79b3754ed98a30c2ba.ps'"

(although the figure window is plotted correctly).

The script works when I switch to the second xlabel statement,
or change the savefig output to png.

My setup:

matplotlib data path /home/phil/usr24/share/matplotlib
$HOME=/home/phil CONFIGDIR=/home/phil/.matplotlib loaded rc file /home/phil/.matplotlib/matplotlibrc matplotlib version 0.85.1.cvs verbose.level helpful interactive is True platform is linux2 numerix Numeric 24.2 font search path ['/home/phil/usr24/share/matplotlib'] loaded ttfcache file /home/phil/.matplotlib/ttffont.cache backend GTKAgg version 2.4.1 This is dvips(k) 5.92b Copyright 2002 Radical Eye Software (www.radicaleye.com) dvips: ! DVI file can't be opened. thanks, Phil Austin This behavior has to be idiosyncratic to my system (Fedora Core 3, HP LaserJet 4050N), but I'd appreciate any suggestions about how to debug it. Specifically, when I run the following script: ==> bugreport.py <== from pylab import * fig1=figure(1) plot([0,1],[0,1]) savefig('file1.ps') The resulting file1.ps looks fine with ghostview (ggv-2.8.0-1). Printing with either ggv or lpr using cups-libs-1.1.22-0.rc1.8.7) does nothing (no response, nothing queued). When I run ps2pdf (Aladin 8.53) on the file ps2pdf file1.ps file1_ps2pdf.pdf the resulting file1_ps2pdf.pdf looks find under xpdf, but once again won't print. It also looks fine with Adobe Reader 7.0, and will print. If I then produce a roundtrip postscript file with: acroread -toPostScript -pairs file1_ps2pdf.pdf file1_roundtrip.ps The resulting file1_roundtrip.ps does print. On the off chance that anyone has a clue about what could be going on, I've put file1.ps, file1_ps2pdf.pdf and file1_roundtrip.ps in http://clouds.eos.ubc.ca/~phil/matplotlib_postscript python bugreport.py --verbose-helpful matplotlib data path /home/phil/usr24/share/matplotlib$HOME=/home/phil
CONFIGDIR=/home/phil/.matplotlib
matplotlib version 0.85.1.cvs