Questions tagged [edges]

Edges represent the logical connection between two regions in an entity. In the case of graphs, edges refer to the logical connection between two vertices, or nodes. Use this tag whenever you have a question about working with or traversing edges in a graph or a graph-based database. See also [edge-list].

582 questions
74
votes
6 answers

Graph auto-layout algorithm

To simplify the problem, I have a graph that contains nodes and edges which are on a 2D plane. What I want to be able to do is click a button and it make the automatically layout the graph to look clean. By that I mean minimal crossing of edges,…
Cheetah
  • 13,785
  • 31
  • 106
  • 190
48
votes
1 answer

Graphviz, dot, ortho plots do not respect ports

I am using graphviz and would like to render my graphs with splines = ortho. The problem is that the edges don't respect ports, so it is not possible to analyse the graph. digraph G{ splines= ortho; A [shape = box, label =<
Daniel
  • 561
  • 4
  • 6
33
votes
1 answer

Forcing orthogonal (vertical or horizontal) edges with dot

I would like to force dot displaying only vertical or horizontal edges between nodes. I have found a similar request with the post Family tree layout with Dot/GraphViz, but I am not dealing with trees, so I hope there is a solution without inserting…
nocbos
  • 391
  • 1
  • 4
  • 6
32
votes
6 answers

Implementing Depth First Search into C# using List and Stack

I want to create a depth first search which I have been somewhat successful in. Here is my code so far (Except my constructor, note the Vertex and Edge classes only contain properties, nothing important to post here): private Stack
Dumpen
  • 1,622
  • 6
  • 22
  • 36
31
votes
8 answers

How do I make a CSS triangle with smooth edges?

I have a triangle (JSFiddle) using this CSS: .triangle { width: 0; height: 0; border-top: 0; border-bottom: 30px solid #666699; border-left: 20px solid transparent; border-right: 20px solid transparent; } And this…
kirkaracha
  • 742
  • 2
  • 14
  • 23
26
votes
3 answers

Drawing multiple edges between two nodes with d3

I've been following Mike Bostock's code from this example to learn how to draw directed graphs in d3 and was wondering how I would structure the code so that I could add multiple edges between two nodes in the graph. For example, if the dataset in…
Josh Bradley
  • 4,630
  • 13
  • 54
  • 79
23
votes
6 answers

Drawing multiple edges between two nodes with networkx

I need to draw a directed graph with more than one edge (with different weights) between two nodes. That is, I have nodes A and B and edges (A,B) with length=2 and (B,A) with length=3. I have tried both using G=nx.Digraph and G=nx.Multidigraph. When…
user3484576
  • 231
  • 1
  • 2
  • 3
22
votes
2 answers

GraphViz, grouping multiple edges between the same nodes but with different labels

digraph G { a -> b [ label = "foo" ]; a -> b [ label = "bar" ]; } This will create two edges between the 'a' and 'b' nodes. Is there a way to have only one edge (group them)?
name
  • 5,095
  • 5
  • 27
  • 36
21
votes
1 answer

Updating weight information depending on repeat of edges with networkx

I have a JSON feed data with lots of user relation in it such as: "subject_id = 1, object_id = 2, object = added subject_id = 1, object_id = 2, object = liked subject_id = 1, object_id = 3, object = added subject_id = 2, object_id = 1, object =…
Edenrim
  • 241
  • 1
  • 3
  • 7
20
votes
1 answer

Edge classification in a DFS

According to the book (Intro to Algorithm), in dfs, edges are classified as 4 kinds: Tree Edge, if in edge (u,v), v is first discovered, then (u, v) is a tree edge. Back Edge, if ......, v is discovered already and v is an ancestor, then it's a…
Alcott
  • 17,905
  • 32
  • 116
  • 173
17
votes
1 answer

Get graphviz to draw nodes above edges

Is there any way to force graphviz to always draw the nodes above edges even if the edge is drawn over (or preferably under) the node? So far I have tried ordering them and different layer options but not found a way that works.
Anders
  • 171
  • 1
  • 4
15
votes
3 answers

R igraph convert parallel edges to weight attribute

I'm working with igraph for R. My graph is based on an edgelist which includes parallel edges (more than one edge with the same source and target). I would like to convert these parallel edges to an edge attribute weight. Is there an eay way to do…
supersambo
  • 811
  • 1
  • 9
  • 25
14
votes
4 answers

Rounded edges in picturebox C#

How to round edges in picturebox control. I Want to get angles like ellipse have but i dont know how to do it. I Use C#. Thanks!
Kracken
  • 662
  • 1
  • 11
  • 27
12
votes
1 answer

Gephi not showing Nodes & Edges on graph

It's been awhile since I've used Gephi, but I used to be pretty familiar with everything in v 0.8.xx. I just loaded node & edge files into a brand-new installation of v0.9.0. They show up fine in the data lab & the context menu shows they exist.…
CCapra
  • 139
  • 1
  • 1
  • 4
11
votes
1 answer

How can I permit overlapping edges in Graphviz?

Background I'm using Graphviz to create an Organizational Chart. Problem By default dot creates the following diagram: The desired output combines the edges so that they overlap, with elbow connections: Source Code The following source code…
Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
1
2 3
38 39