有谁知道如何更改图形属性“Norm”。命令;
G = SetProperty[G, "GraphProperties" -> {"Norm" -> 1}]
不能像我预期的那样工作。这是图构造函数;
G = Graph[{Property[1, "Potential" -> 11],2,3,4},
{Property[2 -> 1, "PreferenceIntensity" -> 5], 3 -> 1, 3 -> 2, 1 -> 4},
EdgeWeight -> {5, 3, 4, 2},
Properties -> {"GraphProperties" -> {"Norm" -> 5}},
VertexLabels -> "Name", ImagePadding -> 10] ;
感谢。
答案 0 :(得分:0)
In[1]:= g = Graph[{1 \[DirectedEdge] 2, 2 \[DirectedEdge] 3, 3 \[DirectedEdge] 1},
Properties -> {"GraphProperties" -> {"Norm" -> 1}}];
g2 = SetProperty[g, Properties -> {"GraphProperties" -> {"Norm" -> 5}}];
PropertyValue[#, "Norm"] & /@ {g, g2}
Out[1]= {1, 5}
答案 1 :(得分:0)
这可能有效:
Graph[G, Properties -> {"GraphProperties" -> {"Norm" -> 1}}]
通常,您应该避免创建以大写字母开头的符号名称,因此将来使用g
。