Questions tagged [pygraph]

For issues relating to the Pygraph Python graph manipulation library.

Pygraph is a easy-to-use and functional graph manipulation library in pure . It can be installed without any dependencies aside from the Python core.

Resources

16 questions
9
votes
7 answers

How to get the coordinates from layout from graphviz?

I have been working with pygraph on some project. I completed this example, it works fine. Now, the problem is the following: the graph is drawn in a picture format (gif). What I need is to get the actual coordinates for each node for the graph…
Belphegor
  • 4,456
  • 11
  • 34
  • 59
2
votes
1 answer

Pygraph - path between two nodes with specific weight

I want to find a path in a graph that has connects two nodes and does not use the same node twice. The sum of the weights of the edges must be within a certain range. I need to implement this in pygraph. I'm not sure if there is already an…
majdal
  • 477
  • 1
  • 5
  • 18
2
votes
4 answers

Setting graph attributes in pygraph

I found in the documentation of pygraph how to change the attributes of the nodes and the edges, but I found no help on how to change the attributes of the graphs. I tried without luck: gr = graph() gr.__setattr__('aspect',2) What do you…
Framester
  • 33,341
  • 51
  • 130
  • 192
1
vote
1 answer

Graphviz Separate Nodes

I have a Dataframe that links Employee to Supervisor and I am trying to create a twopi Graphviz to create a radial org chart. I am having issues where some of the nodes overlap. Here is my current code: from networkx.drawing.nx_agraph import…
Bijan
  • 7,737
  • 18
  • 89
  • 149
1
vote
1 answer

graphviz Python Node Shapes-Pie Chart in a node

I am writing a Python script to generate a network graph using graphviz. Some of my nodes represents injection into a network and I am wondering if it is possible to have a Pie-Chart inside some of the nodes. Python code for a simple two node…
1
vote
1 answer

pygraph-hypergraph link node to hyperedge

I'm getting really frustrated using the pygraph library for building hypergraphs with Python. I'm trying to link two different nodes (75, 69) to a hyperedge (31), and then link that hyperedge to other two different nodes (71, 70). i.e: (75,69) --->…
uixnn
  • 13
  • 2
1
vote
0 answers

How to find all cycles in undirected graph with python-graph?

I'm using python-graph and would like to find all cycles in an undirected graph. I'm trying find_cycle() but that returns only one cycle, even if the graph has more than one. Is there any other function for this in python-graph? In another graph…
0
votes
1 answer

Using hypergraphs in pygraph, need verification that example is correct

I am trying to get my head around using hypergraphs in pygraph, the following is a simple example I inserted: hgr = hypergraph() hgr.add_nodes(["A1", "B1", "C1", "D1"]) hgr.add_nodes(["A2", "B2", "C2", "D2"]) hgr.add_nodes(["A3", "B3", "C3",…
nsimplex
  • 449
  • 4
  • 12
0
votes
0 answers

Plotting Py Igraph with fixed nodes

I would like to plot a graph where two of the nodes have fixed coordinates, and the rest are determined using an automatic layout by igraph. The goal is to create an animation in which, in every frame, the location of two nodes is kept constant, and…
0
votes
1 answer

PermissionError when drawing a pygraphviz chart from Jupyter

I am trying to generate a chart with pygraphviz in Python 3. It works on my machine with this Anacondas version: Python 3.3.5 |Continuum Analytics, Inc.| (default, Jun 4 2015, 15:22:11) It returns a PermissionError when I run it from a different…
Ginger
  • 8,320
  • 12
  • 56
  • 99
0
votes
1 answer

TypeError: 'NoneType' object does not support item assignment

I am trying to parse a GraphMl file with the following Code And i am getting the following error. Would you please help me in solving this?
0
votes
1 answer

Variation on critical path in python

I am searching for a way to determine the path with the lowest cost for connecting different coordinates on a map. These coordinates are representing the consumers of a piping network and one supplier I was first searching on the GIS part of stack…
Peter Vanvoorden
  • 181
  • 1
  • 2
  • 11
0
votes
1 answer

ValueError: need more than 1 value to unpack - python graph core

I was planning to try to use this code in order to do a critical path analysis. When running this code I got the following error but I have no idea what it means (because I don't now how the code works). Traceback (most recent call last): File …
Peter Vanvoorden
  • 181
  • 1
  • 2
  • 11
0
votes
1 answer

Copy a pygraph, and modify nodes

I have a pygraph data structure, which I want to modify. I want to perform the following operations: Create a copy of the existing pygraph Modify the nodes in the copy, by walking the tree and changing the node attributes I am unable to find in…
blueFast
  • 41,341
  • 63
  • 198
  • 344
0
votes
1 answer

Python 3.3 cannot run this code because it does not have pygraph is their a simple way to install pygraph or can I ammend the code in some way

Python 3.3 cannot run this code because it does not have pygraph is their a simple way to install pygraoh or can I ammend the code in some way. As you can see I think the rest is fine. It is just the one rather major issue # Import graphviz import…
Wesley Wood
  • 7
  • 3
  • 5
1
2