本文整理汇总了Python中pykml.factory.KML_ElementMaker.viewBoundScale方法的典型用法代码示例。如果您正苦于以下问题:Python KML_ElementMaker.viewBoundScale方法的具体用法?Python KML_ElementMaker.viewBoundScale怎么用?Python KML_ElementMaker.viewBoundScale使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pykml.factory.KML_ElementMaker
的用法示例。
在下文中一共展示了KML_ElementMaker.viewBoundScale方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generate_cbar_element
# 需要导入模块: from pykml.factory import KML_ElementMaker [as 别名]
# 或者: from pykml.factory.KML_ElementMaker import viewBoundScale [as 别名]
def generate_cbar_element(inps):
out_name_base = plot.auto_figure_title(inps.ts_file, inps_dict=vars(inps))
cbar_png_file = '{}_cbar.png'.format(out_name_base)
cbar_png_file = plot_colorbar(out_file=cbar_png_file, vmin=inps.vlim[0], vmax=inps.vlim[1], cmap=inps.colormap)
cbar_overlay = KML.ScreenOverlay(
KML.name('Colorbar'),
KML.Icon(
KML.href("{}".format(cbar_png_file)),
KML.viewBoundScale(0.75)
),
KML.overlayXY(x="0", y="0", xunits="fraction", yunits="fraction"),
KML.screenXY(x="0", y="0", xunits="fraction", yunits="fraction"),
KML.size(x="0", y="250", xunits="pixel", yunits="pixel"),
KML.rotation(0),
KML.visibility(1),
KML.open(0)
)
print('add colorbar.')
return cbar_overlay, cbar_png_file