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


Python GraphProperties.plotly_username方法代码示例

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


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

示例1: LightTimeSeriesFactory

# 需要导入模块: from pythalesians.graphics.graphs.graphproperties import GraphProperties [as 别名]
# 或者: from pythalesians.graphics.graphs.graphproperties.GraphProperties import plotly_username [as 别名]
                vendor_fields = ['Close'],                          # which Bloomberg fields to download
                cache_algo = 'internet_load_return')                # how to return data

    ltsf = LightTimeSeriesFactory()
    tsc = TimeSeriesCalcs()

    df = tsc.create_mult_index_from_prices(ltsf.harvest_time_series(time_series_request))

    gp = GraphProperties()
    gp.title = "S&P500 vs Apple"

    # plot first with PyThalesians and then Plotly (via Cufflinks)
    # just needs 1 word to change
    # (although, note that AdapterCufflinks does have some extra parameters that can be set in
    # GraphProperties)
    gp.plotly_username = 'thalesians'
    gp.plotly_world_readable = True

    pf = PlotFactory()
    pf.plot_generic_graph(df, type = 'line', adapter = 'pythalesians', gp = gp)
    pf.plot_generic_graph(df, type = 'line', adapter = 'cufflinks', gp = gp)

# test simple Plotly bar charts - average differences in EURUSDV1M-1Y vol and USDJPYV1M-1Y slope over past sixth months
if True:
    from datetime import timedelta
    ltsf = LightTimeSeriesFactory()

    end = datetime.datetime.utcnow()
    start = end - timedelta(days=180)

    tickers = ['EURUSDV1M', 'EURUSDV1Y', 'USDJPYV1M', 'USDJPYV1Y']
开发者ID:BryanFletcher,项目名称:pythalesians,代码行数:33,代码来源:plotly_examples.py

示例2: LightTimeSeriesFactory

# 需要导入模块: from pythalesians.graphics.graphs.graphproperties import GraphProperties [as 别名]
# 或者: from pythalesians.graphics.graphs.graphproperties.GraphProperties import plotly_username [as 别名]
        cache_algo="internet_load_return",
    )  # how to return data

    ltsf = LightTimeSeriesFactory()
    tsc = TimeSeriesCalcs()

    df = tsc.create_mult_index_from_prices(ltsf.harvest_time_series(time_series_request))

    gp = GraphProperties()
    gp.title = "S&P500 vs Apple"

    # plot first with PyThalesians and then Plotly (via Cufflinks)
    # just needs 1 word to change
    # (although, note that AdapterCufflinks does have some extra parameters that can be set in
    # GraphProperties)
    gp.plotly_username = "thalesians"
    gp.plotly_world_readable = True

    pf = PlotFactory()
    pf.plot_generic_graph(df, type="line", adapter="pythalesians", gp=gp)
    pf.plot_generic_graph(df, type="line", adapter="cufflinks", gp=gp)

# test simple Plotly bar charts - average differences in EURUSDV1M-1Y vol and USDJPYV1M-1Y slope over past sixth months
if True:
    from datetime import timedelta

    ltsf = LightTimeSeriesFactory()

    end = datetime.datetime.utcnow()
    start = end - timedelta(days=180)
开发者ID:humdings,项目名称:pythalesians,代码行数:32,代码来源:plotly_examples.py


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