相关疑难解决方法(0)

Mathematica 8.0中的新图表

  1. 有没有人想出一种方法来修改Mathematica 8中的Graph对象?特别是,如何获得右键单击图表时获得的相同功能.

  2. 一些新的图形函数冲突Combinatorica,有没有办法强迫Mathematica使用函数的内置版本?换句话说,有没有办法CompleteGraph在我Needs["Combinatorica"]输入Combinatorica版本之后获得内置的访问权限CompleteGraph

为了澄清1,Graph上的Context Menu允许您更改GraphStyle和GraphLayout,我希望能够以编程方式更改它们.这是我发现改变Graph对象GraphStyle的一种方法

g = GridGraph[{4, 4}];
BooleanGraph[Or, g, g, GraphStyle -> "DiagramBlack"]
Run Code Online (Sandbox Code Playgroud)

但是,这会忘记原始图形的选项 VertexCoordinates

在网格图上尝试Brett的食谱

g = GridGraph[{3, 2}, ImageSize -> Tiny]
coords = PropertyValue[{g, #}, VertexCoordinates] & /@ VertexList[g];
Graph[EdgeList[g], GraphStyle -> "BasicGold", 
 VertexCoordinates -> coords, ImageSize -> Tiny]
Run Code Online (Sandbox Code Playgroud)

http://yaroslavvb.com/upload/save/mathematica-change-style.png

Mathematica如何在图形操作上处理图形坐标似乎存在一个错误.下面第一行置换坐标,第二行给出内部警告,可能与坐标有关.对每个顶点使用非整数顶点和显式坐标没有帮助.一种解决方案是全局存储坐标,并具有在修改后fixCoordinates重新分配正确坐标的功能Graph

VertexDelete[GridGraph[{3, 3}], 1]
NeighborhoodGraph[VertexDelete[GridGraph[{3, 3}], 1], 2]
Run Code Online (Sandbox Code Playgroud)

wolfram-mathematica

8
推荐指数
1
解决办法
1389
查看次数

标签 统计

wolfram-mathematica ×1