MultiLogObject Methods
This page details the methods available for the MultiLogObject class which is created following a call to either stratapy.core.correlated_logs() or stratapy.core.multi_fig().
- stratapy.core.MultiLogObject.save(self, filename='./stratapy_output', transparent=False) None
Saves the current figure to a file. The filename should include the desired file extension (e.g., .png, .jpg, .pdf, .svg). If no extension is provided, it defaults to .png.
- Parameters:
filename (str, optional) – The name of the file to save the figure to. Default is ‘./stratapy_output.png’.
transparent (bool, optional) – If True, the background of the saved figure will be transparent. Default is False.
- Return type:
None
Notes
Saving time increases with figure complexity and quality, so it is recommended to use a lower dpi (e.g., 100) during development and increase it (e.g., 300-500) for final figures. dpi is set when the
plot()method of the individual logs is called.Other matplotlib backends like ‘Cairo’ or ‘Agg’ can be used to speed up saving figures.
>>> from matplotlib import use >>> use('Cairo') # or use('Agg')
These may require additional installation of matplotlib dependencies, but can significantly reduce saving time for complex figures.