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


Python PlotUtilities.tom_text_rendering方法代码示例

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


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

示例1: run

# 需要导入模块: from GeneralUtil.python import PlotUtilities [as 别名]
# 或者: from GeneralUtil.python.PlotUtilities import tom_text_rendering [as 别名]
def run():
    """
    <Description>

    Args:
        param1: This is the first param.
    
    Returns:
        This is a description of what is returned.
    """
    data_file = "../_Data/Scores.pkl"
    kw = dict(score_tx_func=get_only_nug2_ruptures)
    runs = [ ["./cache.pkl",dict(),"performance"],
             ["./cache_nug2.pkl",kw,"performance_nug2"]]
    PlotUtilities.tom_text_rendering()
    for cache_name,keywords,plot_name in runs:
        # get the metrics we care about
        metrics = CheckpointUtilities.getCheckpoint(cache_name,
                                                    Offline.get_best_metrics,
                                                    False,data_file,
                                                    **keywords)
        coeffs_compare = [m.coefficients() for m in metrics]
        write_coeffs_file("./coeffs.txt",coeffs_compare)
        # make the plot we want
        fig = PlotUtilities.figure(figsize=(7,3))
        make_metric_plot(metrics)
        axis_func = lambda axes: [ax for i,ax in enumerate(axes) if i < 3]
        loc_last_two = [-0.05,1.1]
        locs = [ [-0.2,1.1], loc_last_two,loc_last_two]
        PlotUtilities.label_tom(fig,axis_func=axis_func,loc=locs)
        # save out the plot
        subplots_adjust = dict(hspace=0.1,wspace=0.1,
                               bottom=0.125,top=0.93)
        PlotUtilities.save_png_and_svg(fig,plot_name,
                                       subplots_adjust=subplots_adjust)
开发者ID:prheenan,项目名称:Research,代码行数:37,代码来源:main_performance_figure.py


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