# Tagged Questions

Questions about handling graphs in Mathematica, graph theory, graph visualization, GraphPlot, the built-in Graph type and the Combinatorica` package.

167 views

### How to convert a graph to a mesh region

As we know,the region is very convenient in Mathematica.And we can convert a MeshRegion into graph like this ...
530 views

### Nested list to graph

The following nested list can be regarded as a representation of a (tree) graph: ...
810 views

### How to add new nodes to an existing graph with fixed (coordinates) nodes?

I'm ultimately trying to create a directed graph with some of the nodes in fixed positions and the other nodes placed around them in "acceptable" positions. It's better if I ask the question by ...
345 views

### Riemann-Spherical Projection of Network onto the $\mathbb{R}^2$-Plane

I'm trying to find a way to plot the graph ...
356 views

### What algorithm is Mathematica 9 using for “SpectralEmbedding” of graphs?

When I specify that a graph should be realized using the "SpectralEmbedding" procedure, what paper / algorithm for spectral embedding is this based on? I was unable to find any documentation for this....
1k views

### Mathematica: Label specific vertices in GraphPlot

How can I label particular vertices in GraphPlot? And have the arrows space out accordingly, for the width of the label? I have Mathematica 7, but I think this question applies to all versions. ...
122 views

### How to extract a Graph[] from an image?

This graph (as a picture) is given below: I am wondering rather than setting up this network graph using Mathematica syntax such as PathGraph,...
123 views

### How can I recover a graph from a graphical output in a notebook after resetting the kernel?

I have an old Mathematica notebook with an output for a graph structure $G$ I would like to recover. However, the routine for building up the graph is stochastic, so I can't simply rerun the code. ...
352 views

### How to view all graphs available in GraphData?

Is there a "gallery" view of all the graphs available in GraphData? I realize that some graphs may not lend themselves to such representation (e.g. some may have ...
420 views

### How to implement hive plot for graphs in Mathematica?

I'm trying to implement a version of the hive plot advocated in [Kryzywinski, et al., 2012]. There are many examples of such graphs on the author's webpage. It would be good enough for me to have ...
396 views

### How to determine edgeweights from width of skeleton using MorphologicalGraph (or workaround)?

Background I'm trying to create a workaround for what seems to be a bug in MMA's graph functions related to edge weights: SO: How to Label Graph Edges with their weights According to MMA's ...
135 views

### Vertexes possibility estimate in graph

I have graph which represents runner race events. Vertex means runner, edge means running event between runners, edge weight is how much more seconds runner won running race against opponent. (running ...
408 views

### How can I compute the chromatic index and number of a graph?

I saw a recent question from M.R. and realized there is no function to compute the chromatic index and number of a graph, other than a really slow method in the now deprecated Combinatorica. So, how ...
299 views

### Visualize the output of Trace in a tree structure

The output of Trace[expr] can be nicely represented as a tree, I guess. Here is an example trace. ...
520 views

### How to visualize the structure of this dynamic programming code

I am studying Mr. Wizard's answer to this question which tries to identify elementary circles in a graph. That answer uses dynamic programming technique to simplify the code. The underlying guideline ...
1k views

### Ordering vertices with minimum Edge Crossing in Circular Graphs

Weighted and sorted Mathematica circular graphs are shown below. My question is how to reorder the vertices in such a way that they have minimum cuts (intersection of edges) while keeping the circular ...
222 views

### Graph does not accept Property Options

My question is concerned with the Graph functionality, which was newly implemented in Mathematica 8. I already used GraphPlot ...
101 views

### How to remap graph properties?

Graph objects support both custom properties, which do not have special meanings, and standard properties, which may be used by some functions. When importing from ...
109 views

### Setting PropertyValue for VertexWeight is not persistent

Bug introduced in 9.0.1 or earlier and fixed in 10.0 ...
358 views

### How to scale edge length and keep layout of edge-weighted Graph?

I love using Graph as structure to store and visualize my data in Mathematica. Consider the following simple example for creating a ...
230 views

### How to set the Y coordinates for a Graph with defined X coordinates to prevent overlap of nodes?

I would like to draw a Graph with defined $x$ coordinates and variable node sizes. If I simply replace the $x$ coordinates of a graph, then nodes can overlap and ...
450 views

### Visualize a tree structure using TreeGraph

I have a code that generates a tree of graphics objects. The structure can be visualized like this, with each Rule constituting a parent child relationship: ...
647 views

### Adding/deleting weighted edges to a weighted graph

How can I add and delete weighted edges in a weighted graph? Using Graph in Mathematica I want to add a weighted edge to a weighted graph. The problem is ...
49 views

### What system functions use VertexWeights?

EdgeWeights -> are used by a lot of functions, but I can't find any exposed usage for VertexWeights ->. I'm not asking ...
411 views

### How to draw hypercube graphs

I'd like to draw hypercube projections like those on the Wikipedia page: I tried with HypercubeGraph[6] but the graph does not look right; it is not symmetric,...
273 views

### Making FindShortestPath a little bit sloppy [duplicate]

I have a dense graph, and I'd like to find multiple "almost shortest" paths from a source vertex, $v_s$, to a sink vertex, $v_s$, on an undirected graph $G$. How can I repeatedly run ...
361 views

### Enumerating all connected graphs with 9 vertices

The version of my Mathematica is 10. I generate a connected graph with 9 vertices, but find that it is not included in Mathematica. ...
241 views

### Draw graph wherein vertices are ArrayPlots

I need to place ArrayPlots in the vertices of graph. i.e. in graph Graph[{1->2, 2->3, 3->1}] I have to replace vertex 1 with ArrayPlots[{{0,0,1}}] and ...
327 views

### The same value of VertexSize for vertices in different graphs causes different vertices size

I generated some graphs. The smallest vertices in the 1st graph should be the same size as the smallest vertices in the second graph. The smallest vertices have the same size (...
225 views

### Extract bibliography from a PDF document

I am trying to extract bibliographies from academic papers which are in pdf format, and I have to do this for 100+ papers. My goal is to create a network of citations amongst the authors and identify ...
498 views

### Don't understand why Mathematica is complaining about my Graph expression; how can I fix it?

The Tube in Arrow problem is fixed in version 10. Note that in version 10 Graph3D must be ...
1k views

### Graph generation given number of edges and nodes

I was wondering if it is possible to have Mathematica generate all graphs with a given number of edges and nodes (and possibly restricting the adjacencies) and draw them I know that there are some ...
4k views

### How to generate random directed connected graph?

How to generate random directed connected graph? I need to create graph which will pass: ConnectedGraphQ[^]
151 views

### Visualizing subgraphs while specifying the locations of vertexes

I would like to visualize separate connected components of a graph defined by data points lying in the two-dimensional plane by surrounding each connected component subgraph by a bounding curve. I ...
2k views

### Eigenvalue / Eigenvector Calculation

I'm currently trying to compute the three smallest eigenvectors for a 34 by 34 matrix. While I was expecting this to take some time, Mathematica has been running for the past 3 hours, which seems ...
974 views

### Graph adjacency matrix with unconnected nodes

I am trying to display a series of 9x9 adjacency matrices which represent directed graphs on a 3x3 grid. The issue I am running up against is this (compounded by that fact that I don't really know how ...
422 views

### Is it possible to draw a curved edge between two vertexes of a graph? [duplicate]

The following code generates a graph. ...
279 views

### Converting expressions to “edges” for use in TreePlot, Graph

This question is similar to this: Nested list to graph. How to "flatten" an arbitrary expression, eg expr = a[b[c, d[e][f], g], h] to a list of key-value pairs ...
471 views

### Flow in pipeline graph

I have pipeline directed graph which has one source and several sinks ...
164 views

### Grouping the list of numbers that have common.

I am working on some simple problem. It is like puzzle.. Let's say I have some list input={{1,1},{1,2},{1,3},{2,3},{3,3},{4,4}} Which means 1 can go and back to ...
202 views

### Why the Mouse dragging response not as smooth as Locator

I am experimenting to use MouseDragged eventhandler to change the vertices positions of a triangle, it works, but not as smooth as using Locators. Is this the ...
192 views

### Is it possible to make more room in a graph layout for my VertexRenderingFunction?

Consider the graph produced by: ...
668 views

### How to extract edgeweights from a graph

I have a graph with weighted edges, and I'd like to obtain the edge weights of the edges in the graph. Is there a nicer way of doing this than getting the ...
159 views

### Finding all minimal paths in site percolation?

I want to find all minimal site percolation paths from the left side to the right side, small demo grid. A related question is here on finding bond percolation paths instead of minimal site ...
121 views

### Delete vertices of degree 2 and rewire graph

I want to delete all vertices of degree 2 from a graph and rewire it. Given a graph like graphA, I want to obtain graphB. ...
384 views

### How to color edges of a graph which has multiple edges connecting certain vertices

I'm studying BIBD(Balanced Incomplete Block Design) and want to draw some graphs by coloring their blocks in different colors, respectively. A block is a collection of edges (or vertices). For ...
285 views

### Is there something wrong with VertexConnectivity

Note: this is fixed in version 10. As I noticed in the documentation VertexConnectivity is defined as the following The vertex connectivity of a graph $g$ is ...
891 views

### How to turn a random graph into a matrix

I have constructed a random graph with Mathematica using the RandomGraph command. Now I would like to convert this graph to a matrix, but I don't know how. The ...