增加保存图片的功能
This commit is contained in:
parent
7792ef4ccf
commit
e844307987
@ -2956,6 +2956,11 @@ class BacktestingEngine(object):
|
||||
plt.tight_layout()
|
||||
#plt.xticks(xindex, tradeTimeIndex, rotation=30) # 旋转15
|
||||
|
||||
fig_file_name = os.path.abspath(os.path.join(os.path.dirname(__file__), 'TestLogs',
|
||||
'Fig_{0}.png'.format(
|
||||
datetime.now().strftime('%Y%m%d_%H%M'))))
|
||||
fig = plt.gcf()
|
||||
fig.savefig(fig_file_name)
|
||||
plt.show()
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user