Ok, thanks everyone. Let me gather all these discussions. First of all, as Janus noted, there are two ways to draw graphs in Mathematica. The first is the Combinatorica path, which comes as a supplement. Secondly, the GraphPlot method, which is a built-in implementation of Mathematica for drawing graphs. GraphPlot uses the Spring layout to draw graphs. According to three people, we use ShowGraph [] to draw graphs in combination with combinatorics.
, , ShowGraph []. Mathematica 7 ,
ShowGraph [g] g.
, ?
[e, v, opts] , e - , , v - , options opts - "
, Combinatorica , . ... , Combinatorica g. g[[0]] Graph, g[[1]] , g[[2]] . ?
, g[[1]] g[[2]] Graph. :
e = {{1,2}, {{1,3}}}
opts = {{{0,0}}, {{-5,5}}, {{5,5}}}
g = Graph[e, opts]
1, 2 3. , ? Combinatorica VertexLabel ShowGraph []. VertexLabel- > True, , 1, 2 3. , :
ShowGraph[g, VertexLabel->{a,b,c}]
, ?:.)
. . Combinatorica .
, , . . , :
g = Random[10, 0.23]
10 , 0,23.
, ,
Combinatorica!