本文整理汇总了Python中pythalesians.graphics.graphs.graphproperties.GraphProperties.style_sheet方法的典型用法代码示例。如果您正苦于以下问题:Python GraphProperties.style_sheet方法的具体用法?Python GraphProperties.style_sheet怎么用?Python GraphProperties.style_sheet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pythalesians.graphics.graphs.graphproperties.GraphProperties
的用法示例。
在下文中一共展示了GraphProperties.style_sheet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ticker
# 需要导入模块: from pythalesians.graphics.graphs.graphproperties import GraphProperties [as 别名]
# 或者: from pythalesians.graphics.graphs.graphproperties.GraphProperties import style_sheet [as 别名]
tickers = tickers, # ticker (Thalesians)
fields = ['close'], # which fields to download
vendor_tickers = vendor_tickers, # ticker (Bloomberg)
vendor_fields = ['PX_LAST'], # which Bloomberg fields to download
cache_algo = 'internet_load_return') # how to return data
daily_vals = ltsf.harvest_time_series(time_series_request)
# plot data
gp = GraphProperties()
pf = PlotFactory()
gp.title = 'Spot values'
gp.file_output = 'demo.png'
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
示例2: ticker
# 需要导入模块: from pythalesians.graphics.graphs.graphproperties import GraphProperties [as 别名]
# 或者: from pythalesians.graphics.graphs.graphproperties.GraphProperties import style_sheet [as 别名]
fields=["close"], # which fields to download
vendor_tickers=vendor_tickers, # ticker (Bloomberg)
vendor_fields=["PX_LAST"], # which Bloomberg fields to download
cache_algo="internet_load_return",
) # how to return data
daily_vals = ltsf.harvest_time_series(time_series_request)
# plot data
gp = GraphProperties()
pf = PlotFactory()
gp.title = "Spot values"
gp.file_output = "output_data/demo.png"
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