Timeline for How to plot connected components in the format of community structure plot?
Current License: CC BY-SA 4.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 18, 2019 at 8:09 | comment | added | Tugrul Temel |
Unfortunately I have version 11 which does not support your simpler code . Thank you.
|
|
Jul 18, 2019 at 7:54 | comment | added | kglr |
With version 12 updates, SimpleGraph works fine (it retains vertex names, edgeweights...) so if your adjacency graph has named vertices, that is, if you define it as ag2 = AdjacencyGraph[Values @ vLabels, am] , then sg = SimpleGraph[ag2] retains vertex names: VertexList[sg] == VertexList[ag2] is True .
|
|
Jul 18, 2019 at 7:33 | comment | added | Tugrul Temel |
I was writing a new question but in the meantime I discovered an answer to my question about SelfLoops . Here is the code: SeedRandom[1]; am = RandomInteger[{0, 1}, {10, 10}]; ag = AdjacencyGraph[am, VertexLabels -> "Name"]; vLabels = {1 -> AGR, 2 -> FIS, 3 -> CO1, 4 -> CO2, 5 -> MA1, 6 -> MA2, 7 -> EGW, 8 -> CST, 9 -> WHS, 10 -> HOT}; SimpleGraph[ag, VertexLabels -> vLabels]
|
|
Jul 18, 2019 at 7:07 | comment | added | Tugrul Temel | Yes, I should post a new question. Thanks. | |
Jul 18, 2019 at 7:03 | comment | added | kglr | @Tugrul, maybe post a new question with an example? | |
Jul 18, 2019 at 6:55 | comment | added | Tugrul Temel |
It works for adjacency matrix, though vertex names are removed, which I do not want.I have been struggling with this problem for a long time. When I plot a graph using SimpleGraph it drops the vertex names. I also tried SelfLoopStyle and SelfLoops but no success. I have a weighted directed graph with vertex names. I simply like to keep the integrity of the graph but when plotting it I do not want to see the selfloops with vertex names kept.
|
|
Jul 18, 2019 at 3:37 | comment | added | kglr |
@Tugrul, does SimpleGraph@g help?
|
|
Jul 18, 2019 at 3:33 | comment | added | Tugrul Temel |
I am having trouble with SelfLoops . In my graph, there are many self loops which I do not want to see. How can you drop them out of the final graph view?
|
|
Jul 17, 2019 at 5:59 | history | edited | kglr | CC BY-SA 4.0 |
deleted 262 characters in body
|
Jul 17, 2019 at 4:42 | history | edited | kglr | CC BY-SA 4.0 |
added 185 characters in body
|
Jul 17, 2019 at 4:36 | history | edited | kglr | CC BY-SA 4.0 |
added 452 characters in body
|
Jul 17, 2019 at 4:28 | vote | accept | Tugrul Temel | ||
Jul 17, 2019 at 4:27 | history | answered | kglr | CC BY-SA 4.0 |