Commit 8af965c7 authored by 赵杰's avatar 赵杰

折线图

parent ecf92890
...@@ -89,7 +89,7 @@ def draw_month_return_chart(xlabels, product_list, cumulative): ...@@ -89,7 +89,7 @@ def draw_month_return_chart(xlabels, product_list, cumulative):
ax2.plot(loc, cumulative['data'], color='#D40000', marker='.', linewidth=3, label=cumulative['name']) ax2.plot(loc, cumulative['data'], color='#D40000', marker='.', linewidth=3, label=cumulative['name'])
# 添加数字标签 # 添加数字标签
for a, b in zip(range(len(xlabels)), cumulative['data']): for a, b in zip(range(len(xlabels)), cumulative['data']):
ax2.text(a*1.05, b*1.05, '%.2f' % b + '%', ha='center', va='bottom', fontsize=fontsize, color='#D40000') ax2.text(a*1.05, b, '%.2f' % b + '%', ha='center', va='bottom', fontsize=fontsize, color='#D40000')
ax2.legend(loc='upper center', fontsize=fontsize) ax2.legend(loc='upper center', fontsize=fontsize)
# plt.show() # plt.show()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment