0

有谁知道如何更改图形属性“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] ;

谢谢。

4

2 回答 2

0

这可能有效:

Graph[G, Properties -> {"GraphProperties" -> {"Norm" -> 1}}]

通常,您应该避免创建以大写字母开头的符号名称,因此g请在将来使用。

于 2012-02-01T06:36:09.440 回答
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}
于 2012-01-31T20:54:06.560 回答