当前位置: 首页>>代码示例>>Python>>正文


Python pagesizes.landscape方法代码示例

本文整理汇总了Python中reportlab.lib.pagesizes.landscape方法的典型用法代码示例。如果您正苦于以下问题:Python pagesizes.landscape方法的具体用法?Python pagesizes.landscape怎么用?Python pagesizes.landscape使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在reportlab.lib.pagesizes的用法示例。


在下文中一共展示了pagesizes.landscape方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: gen_decomposition

# 需要导入模块: from reportlab.lib import pagesizes [as 别名]
# 或者: from reportlab.lib.pagesizes import landscape [as 别名]
def gen_decomposition(denovo_name, basis_names, weights, output_path, project, reconstruction, statistics):

	c = canvas.Canvas(output_path+"/"+denovo_name+"_decomposition_"+project+".pdf", pagesize=letter)
	c.setPageSize(landscape(letter))
	c.setFont("Arial-Bold", 7.19)

	basis_plots = []
	for i in range(0,len(basis_names)):
		basis_plots.append([basis_names[i], weights[i]])


	# create for loop to iterate through list, then change second value in list of lists
	# Otherwise sorts strings and then 5.14% > 48.54%
	for j in range(0, len(basis_names)):
		basis_plots[j][1] = float(basis_plots[j][1].strip("%"))
	sorted_list = sorted(basis_plots, key=lambda tup: tup[1], reverse=True)

	gen_plot(denovo_name, sorted_list, output_path, project, c, reconstruction, statistics)

	c.save() 
开发者ID:AlexandrovLab,项目名称:SigProfilerExtractor,代码行数:22,代码来源:PlotDecomposition_SBS96.py

示例2: gen_decomposition

# 需要导入模块: from reportlab.lib import pagesizes [as 别名]
# 或者: from reportlab.lib.pagesizes import landscape [as 别名]
def gen_decomposition(denovo_name, basis_names, weights, output_path, project, reconstruction, statistics):
	# Note: 0th index contains the title of the column
	c = canvas.Canvas(output_path+"/"+denovo_name+"_decomposition_"+project+".pdf", pagesize=letter)
	c.setPageSize(landscape(letter))
	c.setFont("Arial-Bold", 7.19)

	basis_plots = []
	for i in range(0,len(basis_names)):
		basis_plots.append([basis_names[i], weights[i]])


	# create for loop to iterate through list, then change second value in list of lists
	# Otherwise sorts strings and then 5.14% > 48.54%
	for j in range(0, len(basis_names)):
		basis_plots[j][1] = float(basis_plots[j][1].strip("%"))
	sorted_list = sorted(basis_plots, key=lambda tup: tup[1], reverse=True)

	gen_plot(denovo_name, sorted_list, output_path, project, c, reconstruction, statistics)

	c.save() 
开发者ID:AlexandrovLab,项目名称:SigProfilerExtractor,代码行数:22,代码来源:PlotDecomposition_ID83.py

示例3: gen_decomposition

# 需要导入模块: from reportlab.lib import pagesizes [as 别名]
# 或者: from reportlab.lib.pagesizes import landscape [as 别名]
def gen_decomposition(denovo_name, basis_names, weights, output_path, project, reconstruction, statistics):
	# Note: 0th index contains the title of the column
	c = canvas.Canvas(output_path+"/"+denovo_name+"_decomposition_"+project+".pdf", pagesize=letter)
	c.setPageSize(landscape(letter))
	c.setFont("Arial-Bold", 7.19)

	basis_plots = []
	for i in range(0,len(basis_names)):
		basis_plots.append([basis_names[i], weights[i]])

	# create for loop to iterate through list, then change second value in list of lists
	# Otherwise sorts strings and then 5.14% > 48.54%
	for j in range(0, len(basis_names)):
		basis_plots[j][1] = float(basis_plots[j][1].strip("%"))
	sorted_list = sorted(basis_plots, key=lambda tup: tup[1], reverse=True)

	gen_plot(denovo_name, sorted_list, output_path, project, c, reconstruction, statistics)

	c.save() 
开发者ID:AlexandrovLab,项目名称:SigProfilerExtractor,代码行数:21,代码来源:PlotDecomposition_SBS1536.py

示例4: build_doc

# 需要导入模块: from reportlab.lib import pagesizes [as 别名]
# 或者: from reportlab.lib.pagesizes import landscape [as 别名]
def build_doc(cls, path, pagesize=None, showBoundary=1, allowSplitting=1, **dargs):
        if pagesize is None:
            pagesize = landscape(letter)
        return BaseDocTemplate(path, pagesize=pagesize, showBoundary=showBoundary, allowSplitting=allowSplitting,
                               **dargs) 
开发者ID:bpsmith,项目名称:tia,代码行数:7,代码来源:builder.py


注:本文中的reportlab.lib.pagesizes.landscape方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。