2

I am wondering if I can make a graph like that somehow: LDG Graph for a Chemical Process Industry

I am new to mathematica, I tried to play with Creating a graph with variable size of vertices and variable thickness of edges . I figured if I could get the data in that form I could make some changes and try to adapt it to mine. But that is not working.

Can someone help me please??

This is what the data sample looks like in tabulated form: enter image description here

I used this:

trans = Uncompress@
"1:eJxTTMoPShNkYGAoZgESPpnFJWlMIB4PkHDJLEpNLklNcU1JTy1mBEkXg+\
TcDAkrMcKjJASsJASXKWBJI4hKPErcIEp8BolzIdRAuxdqEUE/Uc0mfF5CdowhABdjfqo=\
 ";
l = VertexList[Graph[trans]];
(*Weigths for vertices*)
r = RandomReal[{0.5, 1}, Length[l]];
vs = Transpose@{l, r} /. List[a_, b_] -> Rule[a, b];
(*Adjust font size*)
vls = Transpose@{l, r} /. 
List[a_, b_] -> Rule[a, Directive[Black, Bold, 20*b]];
(*Weigths for line thicknes*)
rr = RandomReal[{0.1, 1}, Length[DeleteDuplicates@trans]]/100;
es = (First@# > Directive[Thickness[Last@#], Opacity[.5]]) & /@ 
Transpose@{DeleteDuplicates@trans, rr};
g = Graph[DeleteDuplicates@trans, 
VertexLabels -> Placed["Name", Center], 
VertexShapeFunction -> "Capsule", VertexSize -> vs, 
VertexLabelStyle -> vls, EdgeStyle -> es, 
EdgeShapeFunction -> 
GraphElementData["ShortUnfilledArrow", "ArrowSize" -> 0.03]]

and got this, which is not what I need
Graph

0 Answers0