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
1
vote
1 answer

Longest Path Algorithm for Layer Assignment

I'm working on a program to generate an organizational chart of a company. I have been reading about the longest path algorithm to layer the vertices, and one thing has been bugging me. The reading that I have done suggests that the graph should be…
Eric
  • 688
  • 2
  • 9
  • 23
0
votes
2 answers

Graph drawing algorithm

I have an undirected graph on matris by vertex adjacency relations like that; /* a b c d * a -1 0 1 1 * b 0 -1 1 1 * c 1 1 -1 1 * d 1 1 1 -1 * */ int G[4][4] = {{-1, 0, 1, 1}, …
miqbal
  • 2,213
  • 3
  • 27
  • 35
0
votes
1 answer

Live graphing multiple channels of data, platform / framework selection

What framework / library / platform would you suggest for creating a Linux, preferably multiplatform, application displaying eight oscilloscope like graphs, updating in realtime? I'm imagining a view of the eight channels scrolling steadily to the…
Larsp
  • 65
  • 7
0
votes
0 answers

How to draw a 10-bit color array by ID2D1DeviceContext::DrawImage or ID2D1DeviceContext::DrawBitmap?

I am trying to draw something 10-bit pixel arrays on to the HDR canvas but failed. I add my codes base on https://github.com/vesa-org/DisplayHDRTest The code is inserted into Game::GenerateTestPattern_CalibrateMaxFullFrameValue I could judge from…
0
votes
1 answer

Large enough bounding box for graph cluster

I want to programmatically draw graphs (preferably using dot, gvpack and neato). I can generate the graph structure using a library, then write a file containing the graph described with dot, and then pack all graphs in the same file. Each graph has…
0
votes
1 answer

Python - How to display directed multigraph with different node shapes using networkx.draw()

I have seen a similar question here and its accepted answer for a digraph. The idea for a digraph is to add nodes to as many different subgraphs as there are node shapes ('o', 'd', 's', etc.), then add edges between nodes and finally plot each using…
Cbhihe
  • 511
  • 9
  • 24
0
votes
0 answers

update pi_graph values in FigureCanvasTkAgg without destroying the frame

I am creating a pi graph where the data will be passed dynamically so created a method to pass variables so that it displays image on canvas but, I am not able to update data of canvas data , so should every time need to destroy the frame and create…
ClownBunny
  • 181
  • 9
0
votes
2 answers

Graph drawing libraries using Raphael

I'm looking for javascript libraries that draw graphs using the Raphael library. Until now I've found these ones: Graph Dracula http://www.graphdracula.net/ Joint http://www.jointjs.com/ Is anyone using them? Do you know their pros/cons? Do you…
cdarwin
  • 4,141
  • 9
  • 42
  • 66
0
votes
1 answer

How to draw Caterpillar Trees in Networkx beautifully?

I want to draw Caterpillar trees using Networkx. Is there a way to draw in a way that the spine is in a straight line and the leaves are clearly visible? The image from Wikipedia is a good example of something I want to draw.
0
votes
1 answer

Forcing a node to stay on top when creating a cycle

I have the following graph: digraph G { u1, u2, u3, u5 [ shape = oval, style=filled, fillcolor="palegreen"]; u3 -> v3 -> v5_0 -> v5_1 -> v1; u5 -> v8 -> v5_1; v1 -> v5_2 -> v2; u1 -> v2; v2 -> u2; } Now, I want u2 and u3 to be the…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
0
votes
2 answers

In graphviz, can you bring two vertices closer together?

When describing a graph with graphviz, I sometimes find I want two vertices to appear closer together than the layout engine I chose places them. Is there a way to hint that I want them closer? I'm mostly interested in the case of two connected…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
0
votes
0 answers

How can I get the coordinates of a rectangular DOM element?

I am trying to draw a graph using D3 where the nodes are rectangular. Then, for some reason, I need to find out the coordinates of those drawn nodes to draw the edges between the nodes. How can I get the coordinates of these rectangular nodes? I…
0
votes
0 answers

Interactively highlight nodes and edges in igraph

In the networkx library is possible to click on a node and hi-light it and it’s edges. This page illustrates this solution: Interactive networkx. This is a desktop-based solution. I tried to find a similar solution for the igraph library but I…
Alan Valejo
  • 1,305
  • 3
  • 24
  • 44
0
votes
1 answer

Ranking of nodes provides unranked result

I have the following graphviz input: digraph para { node [shape=record]; rankdir=BT; 0 [label=<00,0>]; 1 [label=<11,1>]; 2 [label=<20,2>]; 3 [label=<21,1>]; 4…
TobiR
  • 207
  • 3
  • 11
0
votes
1 answer

How do you count the amount of times a method is called?

This is a very simple Java code and I want to write a code that counts how many times the step method is called. Essentially, this code will draw a blob and count how many "steps" the blob takes. If the step number is equal to the Max, then the blob…