new Graph in Mathematica 8.0

前端 未结 3 516
北荒
北荒 2020-12-19 04:55
  1. Has anybody figured out a way to modify Graph objects in Mathematica 8? In particular, how to get the same functionality you get when you right click on the graph.<

3条回答
  •  盖世英雄少女心
    2020-12-19 05:34

    The following will preserve the vertex coordinates of the original graph.

    g = CompleteGraph[5];
    coords = PropertyValue[{g, #}, VertexCoordinates] & /@ VertexList[g];
    Graph[VertexList[g], EdgeList[g], GraphStyle -> "BasicGold", 
     VertexCoordinates -> coords]
    

    Mathematica graphics

    I would think something similar could preserve other options as well, though I haven't tried it.

提交回复
热议问题