Questions about handling graphs in Mathematica, graph theory, graph visualization, GraphPlot, the built-in Graph type and the Combinatorica` package.
5
votes
2answers
141 views
Graph does not evaluate some options when not displayed
How can I force Graph to evaluate all its options without actually displaying the graph itself?
Evaluating the following code ignores the ...
4
votes
1answer
198 views
Drawing a graph with specified edge lengths
I was wondering if it was possible to ask Mathematica to draw a graph provided some set of vertices: $(v_1, ..., v_N) \in V$ connected by $M$ edges $(e_1, ..., e_M) \in E$, where the length of each ...
4
votes
1answer
517 views
When do I use Mathematica, when do I use Gephi, and how do I use them together?
Mathematica has great operations for analyzing graphs but when the graphs are a bit bigger, Gephi seems to be more efficient (at least on my computer) at drawing and analyzing, i.e. visualizing the ...
3
votes
2answers
173 views
Combinatorica: Girth[] and FindCycle[] disagreement
Warning: run the following code in a fresh Mma session, as some symbols could be shadowed (depending on your Mma version)
While trying to answer this question, I fell into the following:
...
2
votes
2answers
147 views
Showing a forest with root of the trees on the top
I have a Graph object that contains a forest with directed trees. I want to draw the forest such that the root of the trees are on the top and the leaves are on the bottom. If I use the following line ...
7
votes
1answer
163 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 ...
6
votes
1answer
429 views
Dynamic Graph visualization
I'm working on a C++ library that will be used to construct and study certain graphs (as in a set of connected vertices, not a function plot). These graphs will be dynamic in nature (and can ...
6
votes
3answers
304 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 ...
6
votes
2answers
166 views
Truncate TreeForm to show only the top
For some expressions, TreeForm may grow very long. I'm only interested in the top levels of the expression. How can I get the tree form of only the first levels an ...
5
votes
3answers
159 views
Rendering polygon as graph with directed edges in Mathematica
In Mathematica I'm trying to render a polygon as a set of vertices and directed edges.
What I have so far:
...
5
votes
2answers
234 views
Coloring edges in GraphPlot
I'm a little stuck with graph drawing part of my research — I can't use the Graph function for plotting my graphs, because my graph is a multi-graph. ...
4
votes
1answer
139 views
Removing edge weights from a Graph
How can I remove EdgeWeights from a Graph without affecting any other properties of the graph?
Let's construct a graph with ...
3
votes
0answers
131 views
+50
Caching of Graph Graphics
In this answer, Simon Woods concludes that when you display an expression with head graph more than once, something is getting stored somewhere. I looked into it too and found out this only happens if ...
3
votes
1answer
500 views
How to write a function to add edges or vertex to a graph
I need to add either a vertex or an edge to a graph, and also sometimes, vertices or edges, or a mixture of the two. How to write a function for this?