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


Python GraphProperties.display_brand_label方法代码示例

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


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

示例1: plot_strategy_group_benchmark_pnl

# 需要导入模块: from pythalesians.graphics.graphs.graphproperties import GraphProperties [as 别名]
# 或者: from pythalesians.graphics.graphs.graphproperties.GraphProperties import display_brand_label [as 别名]
    def plot_strategy_group_benchmark_pnl(self):
        pf = PlotFactory()
        gp = GraphProperties()

        gp.title = self.FINAL_STRATEGY
        gp.display_legend = True
        gp.scale_factor = self.SCALE_FACTOR
        #gp.color = 'RdYlGn'

        gp.file_output = self.DUMP_PATH + self.FINAL_STRATEGY + ' (Group Benchmark PnL - cumulative).png'

        # plot cumulative line of returns
        pf.plot_line_graph(self.reduce_plot(self._strategy_group_benchmark_pnl), adapter = 'pythalesians', gp = gp)

        # needs write stats flag turned on
        try:
            keys = self._strategy_group_benchmark_tsd.keys()
            ir = []

            for key in keys: ir.append(self._strategy_group_benchmark_tsd[key].inforatio()[0])

            ret_stats = pandas.DataFrame(index = keys, data = ir, columns = ['IR'])
            ret_stats = ret_stats.sort_index()
            gp.file_output = self.DUMP_PATH + self.FINAL_STRATEGY + ' (Group Benchmark PnL - IR).png'

            gp.display_brand_label = False

            # plot ret stats
            pf.plot_bar_graph(ret_stats, adapter = 'pythalesians', gp = gp)
        except: pass
开发者ID:swaraj007,项目名称:pythalesians,代码行数:32,代码来源:strategytemplate.py

示例2: wrapper

# 需要导入模块: from pythalesians.graphics.graphs.graphproperties import GraphProperties [as 别名]
# 或者: from pythalesians.graphics.graphs.graphproperties.GraphProperties import display_brand_label [as 别名]
        gp.scale_factor = 2
        gp.style_sheet = 'pythalesians'

        # first use PyThalesians matplotlib wrapper
        pf.plot_line_graph(daily_vals, adapter = 'pythalesians', gp = gp)
        pf.plot_generic_graph(daily_vals, gp = gp, type = 'line')

        # use modified 538 Matplotlib stylesheet
        gp.style_sheet = '538-pythalesians'
        pf.plot_line_graph(daily_vals, adapter = 'pythalesians', gp = gp)

        # use miletus matplotlib stylesheet
        gp.style_sheet = 'miletus-pythalesians'
        pf.plot_line_graph(daily_vals, adapter = 'pythalesians', gp = gp)

        # use ggplot matplotlib styleheet
        gp.scale_factor = 1
        gp.display_brand_label = False
        gp.display_source = False
        gp.style_sheet = 'ggplot-pythalesians'
        gp.display_mpld3 = True
        gp.html_file_output = 'demo.htm'
        pf.plot_line_graph(daily_vals, adapter = 'pythalesians', gp = gp)

        # now use PyThalesians bokeh wrapper (still needs a lot of work!)
        gp.scale_factor = 2
        gp.html_file_output = 'demo_bokeh.htm'
        pf.plot_line_graph(daily_vals, adapter = 'bokeh', gp = gp)
        pass

开发者ID:quantcruncher,项目名称:pythalesians,代码行数:31,代码来源:plotfactory_examples.py


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