本文整理汇总了Python中Stoner.Data.select方法的典型用法代码示例。如果您正苦于以下问题:Python Data.select方法的具体用法?Python Data.select怎么用?Python Data.select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stoner.Data
的用法示例。
在下文中一共展示了Data.select方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Data
# 需要导入模块: from Stoner import Data [as 别名]
# 或者: from Stoner.Data import select [as 别名]
"""Create a 2D vector field plot."""
from Stoner import Data, __home__
from os import path
d = Data(path.join(__home__, "..", "sample-data", "OVF1.ovf"))
e = d.select(Z__between=(10, 11)).select(X__between=(10, 18)).select(Y__between=(5, 13))
e.figure(figsize=(8, 4))
# 2D vectors on a 2D Field
e.setas = "xy.uv."
e.subplot(121)
e.plot()
e.title = "3D Vector, 2D Field"
# 3D Vector on a 2D Field
e.subplot(122)
e.setas = "xy.uvw"
e.plot()
e.title = "3D Vector, 3D Field"
e.tight_layout()
示例2: Data
# 需要导入模块: from Stoner import Data [as 别名]
# 或者: from Stoner.Data import select [as 别名]
"""Example using select method to pick out data."""
from Stoner import Data
d = Data("sample.txt", setas="xy")
d.plot(fmt="b-")
d.select(Temp__gt=75).select(Res__between=(5.3, 6.3)).plot(fmt="ro", label="portion 1")
d.select(Temp__lt=30).plot(fmt="g<", label="portion 2")