本文整理匯總了Python中boomslang.Plot.split方法的典型用法代碼示例。如果您正苦於以下問題:Python Plot.split方法的具體用法?Python Plot.split怎麽用?Python Plot.split使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類boomslang.Plot
的用法示例。
在下文中一共展示了Plot.split方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: constructImage
# 需要導入模塊: from boomslang import Plot [as 別名]
# 或者: from boomslang.Plot import split [as 別名]
def constructImage(self):
line = Line()
line.xValues = numpy.arange(0, 150, 0.01)
line.yValues = numpy.cos(.02 * numpy.pi * line.xValues)
plot = Plot()
plot.add(line)
plot.xLimits = (0, 150)
plot.yLimits = (-1, 1)
plot.xLabel = "X"
plot.yLabel = "cos(X)"
splitPlots = plot.split(2)
layout = PlotLayout()
layout.width = 2
layout.addPlot(plot, grouping="unsplit")
for s in splitPlots:
layout.addPlot(s, grouping="splits")
layout.save(self.imageName)
示例2: Line
# 需要導入模塊: from boomslang import Plot [as 別名]
# 或者: from boomslang.Plot import split [as 別名]
#!/usr/bin/env python
from boomslang import Plot, Line, PlotLayout
import numpy
line = Line()
line.xValues = numpy.arange(0, 150, 0.01)
line.yValues = numpy.cos(.02 * numpy.pi * line.xValues)
plot = Plot()
plot.add(line)
plot.setXLimits(0, 150)
plot.setYLimits(-1, 1)
plot.setXLabel("X")
plot.setYLabel("cos(X)")
splitPlots = plot.split(2)
layout = PlotLayout()
layout.width = 2
layout.addPlot(plot, grouping="unsplit")
for s in splitPlots:
layout.addPlot(s, grouping="splits")
layout.save("split.png")