New answers tagged graphs-and-networks
2
votes
Accepted
Strange Vertex Size Problem when Moving From 999 to 1000 Verteces
You could set up VertexShapeFunction -> "Circle".
SetProperty[G, {VertexSize -> vd, VertexShapeFunction -> "Circle"}]
1
vote
Vertex sizes scaled by vertex degree?
This code scales the vertex size and attaches a heatmap color to the vertices. The result is as follows:
...
5
votes
Restores a difficult digraph
Color appearance is influenced by what is around. For example, the vertices have thick edges of different colors, which I tried to reproduced below. I changed to color of the edges to match the target....
8
votes
Accepted
4
votes
Accepted
Adding an edge between G1 vx and G2 vy?
You need to join the two graph into a single one before you can add edges between them. Look up GraphDisjointUnion.
15
votes
Accepted
Can Mathematica read planar graphs with pc format?
One option is to generate these planar graphs using the plantri program and ask for Graph6 output, which Mathematica can read (and IGraph/M can read faster). ...
3
votes
NestGraph Basics
I finally figured this out for those who might be interested, which seems remote :-)
While referring to the image of the above graph, we have:
...
7
votes
Accepted
Finding connected components in 2D integer coordinate system
Does this do what you have in mind?
...
1
vote
Could a function such as Slot be used in this genetic code analysis?
Reading between the lines, I tend to believe OP's actual question is how to work with this large abount of data. Here are a couple of suggestions.
I'd generally suggest to use strings and not symbols ...
5
votes
Random graphs in Poincare disk
Szabolcs's suggestion was pretty straightforward to implement, and the math for the Poincaré disk is easy (for those who are familiar with it), so just for giggles, here's my take:
...
Community wiki
0
votes
VertexLabels not inherited by edges?
IGCompleteGraph from IGraph/M makes it easy to create a complete graph with the vertex names of your choice.
...
1
vote
Spanning Subgraphs of random sizes with probabilities on edges
If you want to retain each edge in a graph g with probability p, you can use:
...
0
votes
Converting Combinatorica graph to standard graph type
Beware that Combinatorica's RegularGraph does not sample regular graphs uniformly. This is stated in the Combinatorica Book which you should get if you use ...
2
votes
Accepted
How to get a plane drawing according to the rotation system given
IGEmbeddingToCoordinates from IGraph/M will do this. However, the result is not usually pretty. Try IGLayoutPlanar on a few ...
6
votes
Can you count the number of self-loops per vertex in a graph?
G= Graph[m1];
AssociationThread[
VertexList[G],
Normal[Diagonal[AdjacencyMatrix[G]]]
]
<|w -> 0, x -> 2, c -> 1, y -> 1, s -> 4, l -> 6, f ...
2
votes
Counting the number of triangles of a multigraph
I think the following works. It finds 64 triangles in your multigraph.
...
1
vote
GraphUnion in Mathematica 12 vs 13
If you want to write code that works correctly in versions from before and after this bug was fixed, use a lightweight wrapper function:
...
2
votes
Accepted
Calculating distance between a set of random points in hyperbolic space
One can both solve the geodesic equations and integrate to find the length of the geodesic numerically. There are packages for working with tensors (notably xAct), but here's a quick-and-dirty hacked-...
1
vote
CommunityGraphPlot colors the communites automatically. Is it possible to access a list of those colors, ordered by community?
With the help of Szabolcs' comment (thanks!), I was able to come up with the following, which does what I need.
...
3
votes
Mathematica package to calculate the graph crossing number
There are some C or Java programs available for computing crossing number, but not in wolfram language. But we can call it. One of them is QuickCross.
...
Top 50 recent answers are included
Related Tags
graphs-and-networks × 1930graphics × 203
plotting × 119
visualization × 82
list-manipulation × 81
performance-tuning × 80
bugs × 74
combinatorics × 70
matrix × 65
labeling × 54
trees × 53
algorithm × 45
image-processing × 42
mathematical-optimization × 33
programming × 33
random × 30
computational-geometry × 28
import × 27
graphics3d × 25
color × 25
combinatorica × 25
style × 24
igraphm × 21
manipulate × 20
functions × 19