本文整理汇总了Python中pele.utils.disconnectivity_graph.DisconnectivityGraph.color_by_group方法的典型用法代码示例。如果您正苦于以下问题:Python DisconnectivityGraph.color_by_group方法的具体用法?Python DisconnectivityGraph.color_by_group怎么用?Python DisconnectivityGraph.color_by_group使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pele.utils.disconnectivity_graph.DisconnectivityGraph
的用法示例。
在下文中一共展示了DisconnectivityGraph.color_by_group方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_color_groups_many
# 需要导入模块: from pele.utils.disconnectivity_graph import DisconnectivityGraph [as 别名]
# 或者: from pele.utils.disconnectivity_graph.DisconnectivityGraph import color_by_group [as 别名]
def test_color_groups_many(self):
dgraph = DisconnectivityGraph(self.tsgraph)
dgraph.calculate()
groups = []
for m in self.db.minima():
groups.append([m])
if len(groups) > 13:
break
dgraph.color_by_group(groups)
dgraph.plot(linewidth=2.)
if _show:
from matplotlib import pyplot as plt
plt.title("color by group")
示例2: test_color_groups
# 需要导入模块: from pele.utils.disconnectivity_graph import DisconnectivityGraph [as 别名]
# 或者: from pele.utils.disconnectivity_graph.DisconnectivityGraph import color_by_group [as 别名]
def test_color_groups(self):
dgraph = DisconnectivityGraph(self.tsgraph)
dgraph.calculate()
groups = [ self.db.minima()[:5],
self.db.minima()[5:10],
self.db.minima()[10:15],
self.db.minima()[15:18],
]
dgraph.color_by_group(groups)
dgraph.plot(linewidth=2.)
if _show:
from matplotlib import pyplot as plt
plt.title("color by group")