igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Python / Cairo Integration on OSX


From: Nick Eubank
Subject: [igraph] Python / Cairo Integration on OSX
Date: Fri, 09 Jan 2015 00:17:52 +0000

Hi All,

Been toying with plotting in python igraph, and have had a terrible time getting py2cairo installed. Went to the cairo listserv, and sounds like py2cairo is out of date and doesn't integrate well with cairo 1.10. 

The alternative is cairocffi,  which implements the same interface (and can be installed via pip). I tweaked my own code -- in three places changed "import cairo" to "import cairocffi as cairo" -- and seems to be working well, so I thought I'd mention it here. Also happy to make changes on github if would be helpful. 

Changes:
change "import cairo" to "import cariocffi as cairo" in:
igraph > drawing > graph.py > around line 39
igraph > drawing > text.py > around line 280
igraph > drawing > __init__.py > around line 36


and change "from cairo import LinearGradient" to "from cairocffi import LinearGradient" in igraph > drawing > edges.py around line 12

Nick


reply via email to

[Prev in Thread] Current Thread [Next in Thread]