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

281 questions
14
votes
5 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
  • 2,501
  • 5
  • 21
  • 37
13
votes
1 answer

Display more attributes in the decision tree

I am currently viewing the decision tree using the following code. Is there a way that we can export some calculated fields as output too? For example, is it possible to display the sum of an input attribute at each node, i.e. sum of feature 1 from…
Praveen Gupta Sanka
  • 609
  • 1
  • 8
  • 25
12
votes
3 answers

Issues installing pygrahviz "fatal error C1083: Cannot open include file: 'graphviz/cgraph.h': No such file or directory"

I'm unable to install pygraphviz even after installing graphviz and ensuring that cgraph.h is present in the directory. I've also manually specified the directory for install. e.g. install-path fatal error C1083: Cannot open include file:…
Mark McGown
  • 975
  • 1
  • 10
  • 26
11
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
  • 119
  • 1
  • 1
  • 3
10
votes
2 answers

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
  • 101
  • 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
  • 8,320
  • 12
  • 56
  • 99
10
votes
3 answers

How to set the width and height of the output 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
  • 28,816
  • 16
  • 73
  • 90
9
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
  • 687
  • 1
  • 11
  • 23
8
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
  • 443
  • 4
  • 11
8
votes
2 answers

Installing pygrahviz in google colab

In order to install graphviz, one can follow, this example: https://colab.research.google.com/drive/1_Qb92Hj5_f2rpta67JC0JKXwE2581Ar-#scrollTo=BOa9gIcDo6GS When I try to install pygraphviz (https://pygraphviz.github.io/) via…
Uwe.Schneider
  • 1,112
  • 1
  • 15
  • 28
8
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,406
  • 2
  • 17
  • 33
8
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,594
  • 14
  • 27
8
votes
1 answer

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
  • 829
  • 1
  • 10
  • 23
7
votes
3 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,638
  • 4
  • 20
  • 34
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
  • 12,146
  • 18
  • 64
  • 109
1
2
3
18 19