Questions tagged [graph-drawing]

Graph drawing is the process of embedding a graph (network) within a space of some kind, most typically a plane.

Graph drawing is the process of embedding a graph (network) within a space of some kind, most typically a plane. Algorithms for graph drawing generally aim to produce output with particular characteristics, such as having few edge crossings. A planar graph is one that can be drawn in a plane with no edge crossings; a planar graph layout algorithm will produce such a layout for any planar graph.

Other graph drawing algorithms provide variants such as orthogonal and/or grid-aligned drawing; these sometimes involve representing vertices as boxes rather than points. These variants are desirable for such applications as circuit layout and automatic plotting of graph-structured diagrams such as UML or database models.

107 questions
3
votes
1 answer

Calculate all possible connected planar graphs with "E" edge

I'm developing a c++ program which calculate and draw all possible connected planar graphs with given E number edge. Like this : My first thought was to find all possible solutions for the N edge by adding one edge to after finding the answer to…
3
votes
1 answer

Given an adjacency matrix, How to draw a graph with matplotlib?

I have an undirected graph described by its adjacency matrix (a numpy array) and I want to plot it, with vertices placed in a n-regular polygon. This code works: n = adyacency_mathix.shape[0] axis = np.linspace(0, 2*np.pi, n, endpoint=False) x, y =…
Diego Silvera
  • 201
  • 1
  • 2
  • 13
3
votes
7 answers

What algorithms are good for interactive/realtime graph-drawing?

What algorithms are good for interactive/realtime graph-drawing for live data and direct-manipulation? Failing that - what libraries do you use to draw graphs? Suggestions; Prefuse information-visualization toolkit any others? BTW- I mean graphs…
Stephen
  • 1,215
  • 2
  • 25
  • 40
3
votes
1 answer

igraph: How to fix node position when drawing incrementally growing subgraphs of the same graph

I have a graph where I have previously precomputed the positions of the nodes by running ForceAtlas2 in Gephi and then I attempt to draw with ìgraph in python. Each node has a date attribute so I iterate over all years, compute the corresponding…
Yannis P.
  • 2,745
  • 1
  • 24
  • 39
3
votes
2 answers

Capture Google Maps Polyline On Click (Per Start/End)

Description I am currently working with Google Maps V3 for our client and they've asked us to implement a drawing tool that will allow them to create connected stream of lines and calculate the distance. However, it seems the Google Maps V3 Drawing…
3
votes
2 answers

Python: Simulate search algorithms in network models

I am using networkx package to draw power law graphs. I want to simulate a search algorithm on this graph and want to visually see the algorithm move from one node to another on the graph. How do I do that?
Bruce
  • 33,927
  • 76
  • 174
  • 262
3
votes
2 answers

Best Graph Drawing Algorithm For Hierarchical Data?

I have a collection of directed acyclic graphs that are nearly trees, in the following sense: each graph has a root, and the vertices are organized into levels such that if v1 and v2 are vertices, then if the level of v1 is less than the level of…
emi
  • 5,380
  • 1
  • 27
  • 45
2
votes
0 answers

Draw non-overlapping lines between objects

Here is a problem, I found and would be interested in finding first steps to get further in thinking about solutions: given a set of n objects (rectangles, circles and similar forms), the task to solve is to draw lines to connect some pairs of them…
Mike75
  • 504
  • 3
  • 18
2
votes
1 answer

A tool for drawing graphs which returns the graph6 code or adjacency matrix

What I'm looking for is a tool where the entire purpose is to draw a graph and have it return the graph6 code (ultimately so that I can easily input it into Sage). On House of Graphs, you can draw a graph and it will search for the graph in the…
Louis D
  • 123
  • 4
2
votes
1 answer

How can I prevent graphviz from drawing edges over labels?

If I run graphviz on this digraph: digraph G { subgraph cluster_0 { style=filled; color=lightgrey; node [style=filled,color=white]; a0; a1; a2; a3; label = "sources"; } subgraph cluster_1 { …
einpoklum
  • 118,144
  • 57
  • 340
  • 684
2
votes
2 answers

Marking/labeling node-edge connection points with graphviz

With Graphviz, I know I can label edges and vertices. But what if I want to label some of the connections? That is, label some points where a specific edge meets a specific vertex? Is that possible? Notes: I don't care about beatuy/visual styles,…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
2
votes
1 answer

graph_tool graph_draw vertex text box margins vertex overlaps

Im trying to output a graph created using python graph_tool library to a png file. The final result is that the drawn graph vertexes overlaps. I realized that the problem is when i put text on the vertexes or edges, is like the margins of the text…
roj4s
  • 251
  • 2
  • 8
2
votes
1 answer

Bézier spline interpolation between two nodes: How to find suitable anchor points?

In a graphical user interface I'm dealing with graph-like structures. Nodes are represented either by circles or rectangles. The user should be able to draw connection lines (directed edges) between two nodes, with the possibility of defining a set…
ph4nt0m
  • 948
  • 4
  • 10
  • 23
2
votes
1 answer

Fruchterman and Reingold algorithm vertices occupy same place in output (graph layout)

I was attempting to implement Fruchterman and Reingold algorithm in Java, but for some reasons, the coordinate of output vertices sometimes occupy the same coordinates, which is not something this algorithm would want. Where did I go…
TuanDT
  • 1,627
  • 12
  • 26
2
votes
0 answers

.NET implementation of planarity testing

Is there any .NET implementation of any planarity testing algorithm like Boyer-Myrvold's or anyone else? I looked through the web but I didn't manage to find
DixonD
  • 6,557
  • 5
  • 31
  • 52