本文整理汇总了Python中boomslang.Plot.addInset方法的典型用法代码示例。如果您正苦于以下问题:Python Plot.addInset方法的具体用法?Python Plot.addInset怎么用?Python Plot.addInset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boomslang.Plot
的用法示例。
在下文中一共展示了Plot.addInset方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: constructImage
# 需要导入模块: from boomslang import Plot [as 别名]
# 或者: from boomslang.Plot import addInset [as 别名]
def constructImage(self):
lines = []
for i in xrange(3):
line = Line()
line.xValues = xrange(5)
line.yValues = [(i+1 / 2.0) * pow(x, i+1) for x in line.xValues]
line.label = "Line %d" % (i + 1)
lines.append(line)
plot = Plot()
plot.add(lines[0])
inset = Plot()
inset.add(lines[1])
inset.hideTickLabels()
inset.setTitle("Inset in Yo Inset\nSo You Can Inset\nWhile You Inset")
insideInset = Plot()
insideInset.hideTickLabels()
insideInset.add(lines[2])
inset.addInset(insideInset, width=0.4, height=0.3,
location="upper left")
plot.addInset(inset, width=0.4, height=0.4, location="lower right")
plot.save(self.imageName)
示例2: xrange
# 需要导入模块: from boomslang import Plot [as 别名]
# 或者: from boomslang.Plot import addInset [as 别名]
#!/usr/bin/env python
from boomslang import Line, Plot, PlotLayout
lines = []
for i in xrange(3):
line = Line()
line.xValues = xrange(5)
line.yValues = [(i + 1 / 2.0) * pow(x, i + 1) for x in line.xValues]
line.label = "Line %d" % (i + 1)
lines.append(line)
plot = Plot()
plot.add(lines[0])
inset = Plot()
inset.add(lines[1])
inset.hideTickLabels()
inset.setTitle("Inset in Yo Inset\nSo You Can Inset\nWhile You Inset")
insideInset = Plot()
insideInset.hideTickLabels()
insideInset.add(lines[2])
inset.addInset(insideInset, width=0.4, height=0.3, location="upper left")
plot.addInset(inset, width=0.4, height=0.4, location="lower right")
plot.save("inset.png")