本文整理汇总了Python中pythalesians.graphics.graphs.graphproperties.GraphProperties.x_title方法的典型用法代码示例。如果您正苦于以下问题:Python GraphProperties.x_title方法的具体用法?Python GraphProperties.x_title怎么用?Python GraphProperties.x_title使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pythalesians.graphics.graphs.graphproperties.GraphProperties
的用法示例。
在下文中一共展示了GraphProperties.x_title方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: str
# 需要导入模块: from pythalesians.graphics.graphs.graphproperties import GraphProperties [as 别名]
# 或者: from pythalesians.graphics.graphs.graphproperties.GraphProperties import x_title [as 别名]
daily_vals = daily_vals / daily_vals.shift(1) - 1
daily_vals.index = [str(x.year) + '/' + str(x.month) for x in daily_vals.index]
daily_vals = daily_vals.drop(daily_vals.head(1).index)
pf = PlotFactory()
gp = GraphProperties()
gp.source = 'Thalesians/BBG (created with PyThalesians Python library)'
gp.html_file_output = "output_data/equities.htm"
gp.title = 'Recent monthly changes in equity markets'
gp.scale_factor = 2
gp.display_legend = True
gp.chart_type = ['bar', 'scatter', 'line']
gp.x_title = 'Dates'
gp.y_title = 'Pc'
# plot using Bokeh then PyThalesians
pf.plot_bar_graph(daily_vals * 100, adapter = 'bokeh', gp = gp)
pf.plot_bar_graph(daily_vals * 100, adapter = 'pythalesians', gp = gp)
# plot daily changes in FX
if True:
from datetime import timedelta
ltsf = LightTimeSeriesFactory()
end = datetime.datetime.utcnow()
start = end - timedelta(days=5)
tickers = ['EUR', 'GBP', 'AUD', 'NZD', 'CAD', 'CHF', 'NOK', 'SEK', 'JPY']
示例2: ticker
# 需要导入模块: from pythalesians.graphics.graphs.graphproperties import GraphProperties [as 别名]
# 或者: from pythalesians.graphics.graphs.graphproperties.GraphProperties import x_title [as 别名]
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)
# resample for end of month
daily_vals = daily_vals.resample("BM")
daily_vals = daily_vals / daily_vals.shift(1) - 1
daily_vals.index = [str(x.year) + "/" + str(x.month) for x in daily_vals.index]
daily_vals = daily_vals.drop(daily_vals.head(1).index)
pf = PlotFactory()
gp = GraphProperties()
gp.source = "Thalesians/BBG"
gp.html_file_output = "output_data/equities.htm"
gp.title = "Recent monthly changes in equity markets"
gp.scale_factor = 2
gp.display_legend = True
gp.chart_type = ["bar", "scatter", "line"]
gp.x_title = "Dates"
gp.y_title = "Pc"
# plot using Bokeh then PyThalesians
pf.plot_bar_graph(daily_vals * 100, adapter="bokeh", gp=gp)
pf.plot_bar_graph(daily_vals * 100, adapter="pythalesians", gp=gp)