Saving plots to files
The matplotlib.pyplot.figure
object enables us to save plots to disk in different file formats with many size and resolution specifiers, such as the dpi=
parameter:
fig.savefig('fig.png', dpi=200)
This writes the following plot to the fig.png
file:
Exported images of trading strategies' performance are frequently used for HTML or email reports. For printing, choose the DPI of your printer as the DPI of the charts.