Questions tagged [pygraphviz]

PyGraphviz is a Python interface to Graphviz. With PyGraphviz it is possible to create, read, write and draw graphs with Python utilizing the Graphviz `dot`language and its layout algorithms.

PyGraphviz is a Python interface to Graphviz. With PyGraphviz it is possible to create, read, write and draw network structures (graphs) with Python utilizing the Graphviz dot language and its layout algorithms.

There is a wide range of applications of Graphviz and PyGraphviz, e.g. flowcharts and biological networks with many features to customize colors, fonts and layout, to mention a few.

Resources

Related Tags

250 questions
13
votes
4 answers

Error while installing PyGraphviz (Mac OS X, Anaconda)

I'm having trouble while installing PyGraphviz. I'm using Anaconda in Mac OS X. Error messages indicates some reasons, but I already checked out it is installed in anaconda directory. Sundongui-MacBook-Pro:site-packages sundong$…
SUNDONG
  • 1,733
  • 3
  • 15
  • 33
12
votes
5 answers

How to run neato from pygraphviz on Windows

I am trying to use pygraphviz and networkx in python (v 2.7) to create a network map. I found a script that looks very useful on stackoverflow: import networkx as nx import numpy as np import string import pygraphviz dt = [('len', float)] A =…
Amlanza
  • 121
  • 1
  • 1
  • 3
10
votes
2 answers

PygraphViz Import Error With PyCharm

I believe I have installed pygraphviz on my Debian build. I can import it if I run Python from the command line: jon@debian:~/anaconda3/bin$ ipython Python 3.5.1 |Continuum Analytics, Inc.| (default, Dec 7 2015, 11:17:45) Type "copyright",…
Ginger
  • 7,124
  • 9
  • 43
  • 85
9
votes
1 answer

graphviz: Nodes of SVG images do not get inserted if output is SVG

I created a small SVG image. It renders just fine in Firefox. Then I created a graphviz file which contained (among other things): mynote [label="", image="mybox.svg"]; Then I ran this on that: $ dot -Tsvg:svg:core infile.dot -o outfile.svg I…
Andrey
  • 91
  • 1
9
votes
1 answer

How to set the width and heigth of the ouput image in Pygraphviz

I am creating a .png file like this: import pygraphviz as pgv G = pgv.AGraph() G.add_nodes("a") G.add_edge("b", "c") G.layout() G.draw("output.png") How can I set the size of the output image?
jbochi
  • 26,975
  • 14
  • 70
  • 87
8
votes
1 answer

Display a .png image from python on mint-15 linux

I am trying to display a .png file I constructed using the following. import pydot, StringIO dot_data = StringIO.StringIO() tree.export_graphviz( clf, out_file = dot_data, feature_names =['age', 'sex', 'first_class', 'second_class',…
Chris Rigano
  • 647
  • 1
  • 10
  • 21
7
votes
1 answer

What do the values that `graphviz` renders inside each node of a decision tree mean?

For the image above using the AdaBoostClassifier library from scipy and graphviz I was able to create this subtree visual and I need help interpreting the values that are in each node? Like for example, what does "gini" mean? What is the…
Q.H.
  • 1,186
  • 1
  • 14
  • 27
7
votes
1 answer

Is it possible to get output of pydot graph without intermediate file?

I have a very simple graph that I want to plot as svg. For example: # graph.dot graph { a -- b; b -- c; } I am currently using pydot to read the file and then generate the svg file as follows: import pydot graphs =…
Harsh Trivedi
  • 1,539
  • 13
  • 23
7
votes
2 answers

Pygraphviz / networkx set node level or layer

I have a dataset that represents a kind of genealogy tree. Each node has 2 parents (except first generation, they have no parents). For a given node, its parents can be from any previous generation. For example a node in generation n, can have a…
Dr Sokoban
  • 1,510
  • 3
  • 17
  • 30
6
votes
3 answers

Installing Graphviz on Os X 10.5.8

I'm trying to install Graphviz 2.14.1 on osX 10.5.8 I installed Graphviz from the Universal Binary here: http://www.ryandesign.com/graphviz/ $ svn co https://networkx.lanl.gov/svn/pygraphviz/trunk pygraphviz - Fingerprint:…
BryanWheelock
  • 11,386
  • 18
  • 60
  • 101
6
votes
1 answer

Python Graphs: Latex Math rendering of node labels

I am using the following code to create a pygraphviz graph. But is it possible to make it render latex math equations (see Figure 1)? If not, is there an alternative python library that plots similar graphs but supports latex rendering ? import…
Curious
  • 5,533
  • 6
  • 33
  • 63
6
votes
0 answers

pygraphviz error: program neato not found in path

I'm running Windows 7, and using python version 2.7. I've been trying to use pygraphviz, but whenever I use G.layout() on a graph, I get the error message; Traceback (most recent call last): File "", line 1, in G.layout() …
meta
  • 598
  • 1
  • 9
  • 16
5
votes
1 answer

How can I increase spacing between nodes in dot graph with pygraphviz?

I'm having trouble trying to increase the spacing between nodes in a hierarchical graph I'm making. I expect to put labels on this graph, so the spacing between nodes has to be fairly large, but I'm unsure how the "args" parameter of…
aleph-null
  • 216
  • 1
  • 8
5
votes
2 answers

Pygraphviz crashes after drawing 170 graphs

I am using pygraphviz to create a large number of graphs for different configurations of data. I have found that no matter what information is put in the graph the program will crash after drawing the 170th graph. There are no error messages…
draB1
  • 63
  • 1
  • 7
5
votes
1 answer

Draw a graph from networkx centered on a basemap position

I'm searching to plot multiple sub-graphes on a map, each sub-graph would be centered in one geographical position (or one coordinate of a plot). Nodes don't have position by themselves (or they all belong to a city), but each subgraph corresponds…
sol
  • 1,150
  • 2
  • 15
  • 30
1
2
3
16 17