PlotUtils.PlotResult#
PlotUtils.PlotResult.py
- class PlotResult(fig, axes, **others)#
Bases:
object
A class to represent the result of a plotting function. It contains the figure and axes objects, as well as any other relevant information.
- savefig(filename, **kwargs)#
Save the figure to a file.
See
matplotlib.pyplot.savefig()
for details on the parameters.
- close()#
Close the figure.
This is equivalent to calling plt.close(self.fig) in matplotlib. It is useful to free up memory when the figure is no longer needed, especially in Jupyter notebooks where figures will appear in output cells.