本文整理匯總了Python中boomslang.Plot.setLegendLabelSize方法的典型用法代碼示例。如果您正苦於以下問題:Python Plot.setLegendLabelSize方法的具體用法?Python Plot.setLegendLabelSize怎麽用?Python Plot.setLegendLabelSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類boomslang.Plot
的用法示例。
在下文中一共展示了Plot.setLegendLabelSize方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: constructImage
# 需要導入模塊: from boomslang import Plot [as 別名]
# 或者: from boomslang.Plot import setLegendLabelSize [as 別名]
def constructImage(self):
line = Line()
line.xValues = range(5)
line.yValues = [2,3,5,7,9]
line.label = "A Line"
linePlot1 = Plot()
linePlot1.setTitle("Small Legend")
linePlot1.add(line)
linePlot1.hasLegend()
linePlot1.setLegendLabelSize(10)
linePlot2 = Plot()
linePlot2.setTitle("Large Legend")
linePlot2.add(line)
linePlot2.hasLegend()
linePlot2.setLegendLabelSize(30)
linePlot3 = Plot()
linePlot3.setTitle("Inherited from Layout")
linePlot3.add(line)
linePlot3.hasLegend()
layout = PlotLayout()
layout.setWidth(2)
layout.addPlot(linePlot1)
layout.addPlot(linePlot2)
layout.addPlot(linePlot3)
layout.setLegendLabelSize(15)
layout.setPlotParameters(left=0.03, bottom=0.03, right=0.98, top=0.94)
layout.save(self.imageName)
示例2: constructImage
# 需要導入模塊: from boomslang import Plot [as 別名]
# 或者: from boomslang.Plot import setLegendLabelSize [as 別名]
def constructImage(self):
plot = Plot()
for i in xrange(24):
line = Line()
line.xValues = xrange(5)
line.yValues = [(i+1) * x for x in line.xValues]
line.label = "Line %d" % (i + 1)
plot.add(line)
plot.addLineColor("red")
plot.addLineColor("blue")
plot.addLineStyle("-")
plot.addLineStyle("dashed")
plot.addLineStyle("dotted")
plot.addMarker('none')
plot.addMarker('x')
plot.addMarker('o')
plot.hasLegend(columns=2)
plot.setLegendLabelSize(8)
plot.save(self.imageName)