本文整理汇总了Python中boomslang.Line.yMaxes方法的典型用法代码示例。如果您正苦于以下问题:Python Line.yMaxes方法的具体用法?Python Line.yMaxes怎么用?Python Line.yMaxes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boomslang.Line
的用法示例。
在下文中一共展示了Line.yMaxes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: constructImage
# 需要导入模块: from boomslang import Line [as 别名]
# 或者: from boomslang.Line import yMaxes [as 别名]
def constructImage(self):
plot = Plot()
# Uneven error bars
line = Line()
line.xValues = [6,10,4,0,8,2,12]
line.yValues = [50,90,30,10,70,20,110]
line.yMins = [y - 30 for y in line.yValues]
line.yMaxes = [y + 50 for y in line.yValues]
line.label = "Asymmetric Errors"
line.color = "red"
# Even error bars
line2 = Line()
line2.xValues = [1,5,3,9,7,11]
line2.yValues = [100, 120, 110, 140, 130, 150]
line2.color = "blue"
line2.label = "Symmetric Errors"
line2.yErrors = [5,25,15,45,35,55]
plot.add(line)
plot.add(line2)
plot.xLabel = "X Label"
plot.yLabel = "Y Label"
plot.hasLegend()
plot.xLimits = (-1, 13)
plot.save(self.imageName)
示例2: Plot
# 需要导入模块: from boomslang import Line [as 别名]
# 或者: from boomslang.Line import yMaxes [as 别名]
#!/usr/bin/env python
from boomslang import Line, Plot
plot = Plot()
# Uneven error bars
line = Line()
line.xValues = range(6)
line.yValues = [25, 21, 30, 23, 10, 30]
line.yMins = [10, 18, 10, 10, 5, 20]
line.yMaxes = [30, 50, 40, 30, 20, 45]
line.label = "Asymmetric Errors"
line.color = "red"
line.xValues = range(len(line.yValues))
# Even error bars
line2 = Line()
line2.xValues = range(6)
line2.yValues = [35, 40, 45, 40, 55, 50]
line2.color = "blue"
line2.label = "Symmetric Errors"
line2.yErrors = [3, 6, 5, 3, 5, 4]
plot.add(line)
plot.add(line2)
plot.setXLabel("X Label")
plot.setYLabel("Y Label")
plot.hasLegend()
plot.save("errorbars.png")