本文整理汇总了Python中boomslang.Plot.legendLabelSize方法的典型用法代码示例。如果您正苦于以下问题:Python Plot.legendLabelSize方法的具体用法?Python Plot.legendLabelSize怎么用?Python Plot.legendLabelSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boomslang.Plot
的用法示例。
在下文中一共展示了Plot.legendLabelSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: constructImage
# 需要导入模块: from boomslang import Plot [as 别名]
# 或者: from boomslang.Plot import legendLabelSize [as 别名]
def constructImage(self):
line = Line()
line.xValues = range(5)
line.yValues = [2,3,5,7,9]
line.label = "A Line"
linePlot1 = Plot()
linePlot1.title = "Small Legend"
linePlot1.add(line)
linePlot1.hasLegend()
linePlot1.legendLabelSize = 10
linePlot2 = Plot()
linePlot2.title = "Large Legend"
linePlot2.add(line)
linePlot2.hasLegend()
linePlot2.legendLabelSize = 30
linePlot3 = Plot()
linePlot3.title = "Inherited from Layout"
linePlot3.add(line)
linePlot3.hasLegend()
layout = PlotLayout()
layout.width = 2
layout.addPlot(linePlot1)
layout.addPlot(linePlot2)
layout.addPlot(linePlot3)
layout.legendLabelSize = 15
layout.save(self.imageName)
示例2: main
# 需要导入模块: from boomslang import Plot [as 别名]
# 或者: from boomslang.Plot import legendLabelSize [as 别名]
def main():
output_graph = sys.argv[1]
plot = Plot()
plot.hasLegend(location='lower right')
plot.xLabel = 'Per-client throughput (Mbps)' # Change this
plot.yLabel = 'CDF'
plot.xLimits = (0, 50)
plot.yLimits = (0, 1)
plot.legendLabelSize = FONT_SIZE
plot.xTickLabelSize = FONT_SIZE - 2
plot.yTickLabelSize = FONT_SIZE - 2
plot.axesLabelSize = FONT_SIZE
for csv_file in sys.argv[2:]:
cdf_table = _make_cdf(csv_file)
line = Line()
line.xValues = [x for (x, _) in cdf_table]
line.yValues = [y for (_, y) in cdf_table]
line.color = colors.pop(0)
line.lineStyle = line_styles.pop(0)
# Extract the filename
line.label = capitalize( csv_file.split('/')[-2].replace('.csv', '') )
plot.add(line)
plot.save(output_graph)
示例3: latency
# 需要导入模块: from boomslang import Plot [as 别名]
# 或者: from boomslang.Plot import legendLabelSize [as 别名]
def latency(output_graph_filename, csv_file_dir_list):
"""
Plots three graphs side-by-side. First, redis performance; second, pkt-in
latency; third, pkt-out latency.
"""
layout = PlotLayout()
redis_plot = Plot()
pkt_in_plot = Plot()
flow_mod_plot = Plot()
redis_plot.yLabel = 'CDF'
flow_mod_plot.hasLegend(location='lower right')
flow_mod_plot.legendLabelSize = 12
redis_plot.xLabel = '(a) Query completion time (ms)'
pkt_in_plot.xLabel = '(b) Switch processing time for ingress (ms)'
flow_mod_plot.xLabel = '(c) Switch processing time for egress (ms)'
for csv_dir in csv_file_dir_list:
color = colors.pop(0)
line_style = line_styles.pop(0)
line_label = csv_dir.split('/')[-2]
attr_dict = {'color': color, 'label': capitalize(line_label),
'yLimits': (0, 1), 'lineStyle': line_style}
redis_line = get_line_from_csv(os.path.join(csv_dir, 'async_redis_latency.csv'),
xLimits=(0,400), **attr_dict)
pkt_in_line = get_line_from_csv(os.path.join(csv_dir, 'pkt_in_durations.csv'),
xLimits=(0,140), **attr_dict)
flow_mod_line = get_line_from_csv(os.path.join(csv_dir, 'flow_mod_durations.csv'),
xLimits=(0,140), **attr_dict)
redis_plot.add(redis_line)
pkt_in_plot.add(pkt_in_line)
flow_mod_plot.add(flow_mod_line)
layout.addPlot(redis_plot)
layout.addPlot(pkt_in_plot)
layout.addPlot(flow_mod_plot)
layout.width = 3
layout.setPlotDimensions(4.5,4.5*0.618)
layout.save('data/graphs/' + output_graph_filename + '.pdf')
print 'Done.'