本文整理匯總了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")