wting / python-graph

Automatically exported from code.google.com/p/python-graph
Other
5 stars 4 forks source link

There is no gv.py for MS Windows #99

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. The example on http://code.google.com/p/python-graph/wiki/Example uses the 
command "import gv"
2. To the best of my knowledge gv does not exist for Windows

What is the expected output? What do you see instead?
I use Eclipse and PyDev and "import gv" results in "Unresolved import" because 
there is no equivalent for the following in Windows:

import sys
sys.path.append('..')
sys.path.append('/usr/lib/graphviz/python/')
sys.path.append('/usr/lib64/graphviz/python/')
import gv

What version of the product are you using? On what operating system?
Eclipse 2.7 on Windows 7

Please provide any additional information below.

Is there any advice you cam provide on how to go about rendering my graph or if 
there is a work around or an alternative.

Thanks so much

Original issue reported on code.google.com by kanungo%...@gtempaccount.com on 12 Sep 2011 at 4:39

GoogleCodeExporter commented 9 years ago
You have to download and install Graphviz for Windows. I'm not sure whether the 
Python modules comes bundled with the Windows install, but the command line 
tools are surely available (and you can call them from your scripts to draw a 
DOT file generated by python-graph).

Unfortunately, there isn't much more we can do about it as Graphviz is an 
entirely different project.

http://www.graphviz.org/

Original comment by pmatiello on 17 Sep 2011 at 1:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
use:

import pygraphviz as gv
.
.
.
.
dot = write(gr)
gvv = gv.AGraph(dot)
gvv.layout(prog='dot')
gvv.draw('file.png')

Original comment by derekdav...@gmail.com on 12 Nov 2013 at 6:16