3
votes
2answers
89 views

Labeling vertices by number in Graph: Getting text to display at the right size

Minor aesthetic question here. I was playing around with Graph's and decided to render a cute-looking family of directed graphs, with the vertices being the number ...
1
vote
1answer
47 views

VertexSize with GraphPlot [closed]

I'm constructing a graph using GraphPlot and I want some vertices to have a different size than others, like this: ...
2
votes
1answer
69 views

Arranging “ranked” nodes of a graph symmetrically

I have Markov chains with a pair of absorbing states taken from the $n$-length strings formed from {"H","T"} for n at least 3 ...
1
vote
1answer
135 views

Creating an animated graph model based on equations

So I have a graph that looks like this ...
14
votes
2answers
769 views

Drawing pairs (graph, circle packing)

Circle packing theorem states: For every connected simple planar graph G there is a circle packing in the plane whose intersection graph is (isomorphic to) G. How to use Mathematica to draw examples ...
4
votes
1answer
142 views

How do I make the color of arrowheads in a graph different from the colors of the arrows?

I'm graphing a Markov process mp = DiscreteMarkovProcess[{1, 0, 0}, ({ {0.6, 0.1, 0.3}, {0.2, 0.7, 0.1}, {0.3, 0.3, 0.4} })]; and would like ...
6
votes
2answers
284 views
1
vote
1answer
94 views

Connecting a vertex to middle of an edge with GraphPlot?

using GraphPlot I'd like to make directed arrow connecting a vertex (node) to the middle of an edge but couldn't find a way. Is this even possible using GraphPlot or other graphics-related commands in ...
2
votes
2answers
327 views

Generating social network graph from a CSV file

I am new to Mathematica and wanted to generate undirected graph for data sets that show the relationships of organizations with each other. The data is in a square matrix. The cells of the matrix ...
2
votes
2answers
134 views

Assigning weights to edges of a hypercube based on the Gray code labels for vertices being connected

Say I want to construct an $n$-dimensional hypercube graph $G$ using the command: G = HypercubeGraph[n]. I'd like to assign edge weights to the $2^{(n-1)}n$ edges ...
2
votes
1answer
228 views

Nicely illustrating the evolution and end-state of a discrete-time Markov chain

I'm simulating a discrete time Markov process on a finite state space corresponding to a linear interval $(x_1, x_2, ..., x_N) \in X$, where each time step $t_i$ involves updating the state of some ...
5
votes
1answer
367 views

How to display each step of an A star algorithm?

I wrote a pathfinding program: A*, which is an extension of Dijkstra. I want to see the result of each step at a time. Which function should I use? The main program is the notebook Astar, which is ...
1
vote
1answer
101 views

GraphPlot with black edges no rendering function

Is there any way to make the edges of a GraphPlot black without tediously writing out a long "EdgeRenderingFunction"? I guess you could ask the same kind of question about vertex labeling. For ...
2
votes
1answer
157 views

Finding a Moore neighborhood connected path of bright pixels along the contour of a text character

I have a simple image, for example a blowup of a Times New Roman character like 'R' saved as a PNG. I then perform the following operations to extract a minimum representation of the contour lines ...
2
votes
1answer
177 views

GraphPlot labels overlapping

If I plot the following graph with an EdgeRenderingFunction, the position of both the labels are at dead center, and with a large graph I have the labels completely ...
1
vote
1answer
119 views

Problem with GlobalClusteringCoefficient

I have a simple problem, I would like to measure the global clustering coefficient for a random graph. Here is my code: ...
14
votes
4answers
456 views

Can TreeForm be displayed “sideways”?

One recurrent problem I'm having with displays generated with TreeForm is that the expressions to be so displayed often at least one level with many (> 20) nodes ...
10
votes
1answer
509 views

Roads network visualization by thickness and color intensity by population from GIS files

We can have road networks of the countries in GIS shape file.For exmple from here. Normally traffic flows are proportionate to populations of the cities. I wonder how we can have the same in ...
1
vote
1answer
150 views

Find size of vertex image relative to the graph coordinate system

I am trying to define a graph using my own VertexShapeFunction with an ActionMenu button being the vertex and a custom ...
9
votes
1answer
348 views

Drawing Zonotopes from Adjacency Matrix

This is crossposted in cs.stackexchange.com, but I have been trying to use Mathematica do this and figured it might be more appropriate to ask here. Define a "simple zonotope" to be a regular ...
5
votes
2answers
319 views

Colorize and the Four-Color Theorem

We can write: MorphologicalComponents[image] // Colorize To assign a random set of colors to each component in some image. The example used for reference by ...
1
vote
1answer
486 views

Adding an image background to a graph that uses vertexposition

Hello Mathematica stackexchange community! I need your help on a research project. I'm looking to create a graph g with vertices in specifies places and then use an image I have as the background of ...
6
votes
2answers
269 views

Convert Graph to Graphics

In Mathematica 9, a graph is returned as an object with head Graph: In[8]:= CompleteGraph[8] // Head Out[8]= Graph ...
0
votes
2answers
286 views

Draw network graph and get the coordinates of each node

I would like to draw an undirected graph by specifying the nodes and the edges among them. This is currently done by, for example: ...
7
votes
0answers
264 views

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 ...
5
votes
1answer
146 views

Why do vertex labels disappear when I edit with drawing tools?

I'm trying to change the text and arrow style in GraphPlot using the drawing tool, but the the vertex labels disappear when I do that: ...
2
votes
1answer
129 views

double arrow in GraphPlot

Is it possible to combine two edges into one with a double arrow? For example: ...
6
votes
1answer
124 views

Tooltip not working in web deployed cdf

I deployed a CDF file in a web page. I used both Mouseover and Tooltip functions. They both work in the raw CDF file. The ...
3
votes
1answer
419 views

Adjacency List representation of a graph

I am looking to draw a graph knowing a simple adjacency representation of the graph like: A = {{1, 3}, {2, 3}, {3, 4, 5}, {4, 5}, {5}} Where ...
3
votes
2answers
163 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 (...
8
votes
1answer
207 views

How can I sequentially apply different graph embeddings?

Imagine I have some graph G, and I perform a graph embedding using a command like: ...
7
votes
1answer
731 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 ...
7
votes
1answer
454 views

How can I display a multigraph with different colored edges?

I'm new to Mathematica(version 9) and I'm trying to display a multigraph with different colored edges. Here's my code so far: ...
1
vote
1answer
123 views

Is there an easy way to specify an arbitrary two-dimensional Polyomino tiling in Mathematica 8.0?

Is there an easy way to generate an arbitrary two-dimensional Polyomino tiling: http://en.wikipedia.org/wiki/Polyomino? Specifically, I would like to generate an array of integer coordinates, for ...
2
votes
2answers
409 views

Edges and crossing

I want to make a program where I have a collection of labeled vertices and edges between the vertices such that they join up with edges $a_{1} a_{2}, \; a_{2} a_{3}, \ldots ,\; a_{n} a_{1}$, so the ...
8
votes
3answers
406 views

TreePlot with centered vertexes

I want to draw a tree plot for Euler totient function for this question like the following: I generate the EulerPhi for first 20 numbers into a list: ...
2
votes
1answer
275 views

Isomorphisms for graphs with loops and multiple edges

I am working with graphs with multiple edges and loops, and I want to eliminate all isomorphic graphs from a long list I've generated. The FindGraphIsomorphism ...
6
votes
1answer
315 views

Interactive Graph Editing with Animation

I want to make a simple interactive user interface like this: Such that when the user clicks on the "Add Edge" button, the edge specified by from and to fiels is added to the graph. The new graph ...
9
votes
2answers
300 views

Transition between graphs

I want to visually demonstrate the manipulations made to a graph. For instance, I have a graph g where using the command ...
29
votes
5answers
6k views

Custom arrow shaft

Inspired by Sjoerd C. de Vries' nice answer to this question, and the desire to pimp a Graph I did with Mathematica recently I would like to know if there are ways to customize the arrow's shaft ...
6
votes
2answers
199 views

How to make each node of a graph a button?

A newbie question this one - MMA help seems to suggest it would be possible to place a button on ( or have a button be ) each node of graph, labelled with the name of said node. I have no idea where ...
14
votes
2answers
596 views

How to measure segment length and branch angle

I am trying to measure segment length and branch angle or bifurcation angle between each pair of segments. My image after thinning looks like this: ...
3
votes
1answer
177 views

Labeled and Graph don't mix?

In an attempt to create a legend for a graph drawing, I find that Labeled only works without the position options (except for Center). ...
14
votes
3answers
998 views

Creating diagrams for category theory

Lately I've been doing algebra and I have found myself drawing a bunch of diagrams when I attempt to solve a problem. Most of the diagrams are very simple so I thought, I bet I can do this in ...
2
votes
2answers
195 views

Working around behaviour of EdgeRenderingFunction

One can make graphs GraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 4 -> 5, 5 -> 1, 1 -> 1, 5 -> 5}] and one can generalize the input such that one ...
3
votes
1answer
180 views

Bring Vertices to the foreground

I'm having some issues with being able to trigger the Tooltip in an AdjacencyGraph, as the edges are "covering" the vertex labels. In the example provided, there are no issues to display the tooltip ...
18
votes
5answers
895 views

How can I replace bi-directional DirectedEdge pairs in a Graph with a single UndirectedEdge?

The Cayley graphs produced by Mathematica 8.0's CayleyGraph function represent actions that are their own inverses in an unconventional way: rather than using a ...
6
votes
3answers
141 views
7
votes
3answers
473 views

Visualizing the output of a Voronoi diagram computation

I need to plot a graph (to be specific: Fortune Algorithm output) with given vertex coordinates and a few unconnected vertices. I am thinking of using Mathematica for that. ...
3
votes
1answer
209 views

Forcing a graph not to resize

This code: ...