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
65
votes
1 answer

Reducing the size (as in area) of the graph generated by graphviz

Does anyone have any general tips for reducing the size of a graph generated by graphviz (size as in area, not as in file size). I have a fairly large graph (700 nodes). I set a smaller font size for each node, but it seems to only reduce the font…
meteoritepanama
  • 6,092
  • 14
  • 42
  • 55
54
votes
3 answers

How to increase node spacing for networkx.spring_layout

Drawing a clique graph with import networkx as nx .... nx.draw(G, layout=nx.spring_layout(G)) produces the following picture: Obviously, the spacing between the nodes (e.g., the edge length) needs to be increased. I've googled this and found this…
clstaudt
  • 21,436
  • 45
  • 156
  • 239
43
votes
2 answers

Right to left edges in dot (Graphviz)

I'm trying to display edges going from right to left (i.e. backwards) using dot: C <- A -> B The best I could do was: digraph { a -> b; c -> a [dir="back"]; {rank=same;c a b} } ..which is fine, except I don't like using c -> a when the edge…
Nickolay
  • 31,095
  • 13
  • 107
  • 185
24
votes
5 answers

Improving graphviz layout

I have perfection paralysis when it comes to producing something graphic. If symmetries of the visual have not been fully explored, I have a harder time comprehending what is going on. I am a very visual learner as well, and I LOVE to simplify…
Hamish Grubijan
  • 10,562
  • 23
  • 99
  • 147
17
votes
2 answers

Drawing Directed Acyclic Graphs: Minimizing edge crossing?

Laying out the verticies in a DAG in a tree form (i.e. verticies with no in-edges on top, verticies dependent only on those on the next level, etc.) is rather simple without graph drawing algorithms such as Efficient Sugiyama. However, is there a…
Robert Fraser
  • 10,649
  • 8
  • 69
  • 93
15
votes
5 answers

Free C++ library for drawing flow diagrams or Directed graph?

I want to embed a flow diagram drawing canvas in my program. Users would possible to: draw "nodes" (rectangle nodes is enough) and "edges" (preferable to be orthogonal) to connect "nodes"; use mouse to drag nodes for layout and resize…
Zhang Long
  • 151
  • 1
  • 1
  • 6
15
votes
3 answers

tips for creating Graph diagrams

I'd like to programmatically create diagrams like this (source: yaroslavvb.com) I imagine I should use GraphPlot with VertexCoordinateRules, VertexRenderingFunction and EdgeRenderingFunction for the graphs. What should I use for colored beveled…
Yaroslav Bulatov
  • 57,332
  • 22
  • 139
  • 197
14
votes
2 answers

How to get and set propertyitems for an image

I'm trying to understand these two methods of the Bitmap or Image. One being .SetPropertyItem() and the other being .GetPropertyItem(). I'm completely confused as to the way the documentation says that I am to set a property item. From the Microsoft…
13
votes
1 answer

How to use the projection/camera technique in c#

I drew the following grid: The above grid is drawn using the following two methods, one to calculate the grid and the other to calculate the centers for each cell: //makes grid in picture box private void drawGrid(int numOfCells, int cellSize,…
Rose
  • 349
  • 3
  • 17
12
votes
6 answers

circuit/block-diagram drawing

I'm looking for either algorithms or visualization tool for (nice) circuit/block-diagram drawing. I am also interested in a general formulation of the problem. By "circuit drawing", I mean the capability of exploring place & route for…
JCLL
  • 5,379
  • 5
  • 44
  • 64
9
votes
3 answers

Tikz: draw edge from node to label of another edge

I'm trying to figure out how to draw an edge between a node in tikz and the label of an edge between two other nodes. Here's an example of what I'm trying to do: Here's my code: \documentclass[11pt]{article} \usepackage[margin=1in,…
par
  • 103
  • 1
  • 1
  • 8
9
votes
1 answer

Graph nodes coordinates evaluation

Which of these (https://stackoverflow.com/questions/492893/graph-drawing-c-library) libraries can be used to evaluate nodes coordinates? I mean I want to draw and manipulate graph by clicking on it to add some nodes or delete, and then evaluate…
Sergey Lapin
  • 1,008
  • 3
  • 12
  • 21
8
votes
1 answer

How to put a node in the center of the dot-generated graph

With the following dot code digraph DG { G -> V; G -> E; G -> P; G -> C; } I generate the following graph How could I move the node G in the centre? That is I wish to get something like this: p.s. My experiments with setting the…
Max Li
  • 5,069
  • 3
  • 23
  • 35
8
votes
6 answers

Positioning of classes in UML diagram

I'm creating a tool for displaying Python project as an UML diagram (+ displaying some code error detection using GUI). I scan some project using Pyreverse and I have all data I need for drawing UML diagram. The problem is positioning of the class…
Jan Vorcak
  • 19,261
  • 14
  • 54
  • 90
6
votes
1 answer

Graphviz or Dynagraph for Graph-manipulation Program?

I'm looking into writing a program that will show a graph to the user. The graph will change over time (the user should be able to right-click on a graph item and ask for more detail, which will pop out new bits of the graph), and the user might be…
Noah Lavine
  • 793
  • 5
  • 7
1
2 3 4 5 6 7 8