是否可以将绘图输出(mplfinance as mpf)发送到电子邮件地址?

2024-09-24 00:26:23 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在绘制以下图表:

 mpf.plot(dfnew_plot,volume=True,style='starsandstripes',datetime_format=' %d-%m',alines= 
 two_points,addplot=apdict,xrotation=45,title=(stock),type='candle',ylabel='ROC5= '+(ROC5) +' ' 
 +'ROC20= '+(ROC20)+ ' ' +'ROCmean= '+(ROCmean),figscale=0.5) 
  • 在Jupyter笔记本的pyhton脚本中,是否可以只将绘图输出自动发送到我的电子邮件地址
  • 是否可以仅将打印输出自动保存为html文件或pdf

enter image description here

谢谢你的支持


Tags: trueformatdatetimeplotstyle图表绘制volume
1条回答
网友
1楼 · 发布于 2024-09-24 00:26:23

Mplfinance允许您将绘图保存到文件(pdf、png、jpg等)

请参阅并阅读此处的所有文档:https://github.com/matplotlib/mplfinance/blob/master/examples/savefig.ipynb

将文件保存到文件后,可以将文件作为电子邮件附件发送。 请参见此处:https://docs.python.org/3/library/email.examples.html

一般来说,通过阅读这里的mplfinance文档,您可以学到很多东西:https://github.com/matplotlib/mplfinance#contents-and-tutorials

相关问题 更多 >