autolens.plot.Output

class autolens.plot.Output(path: Optional[str] = None, filename: Optional[str] = None, format: Union[str, List[str]] = None, bypass: bool = False)
__init__(path: Optional[str] = None, filename: Optional[str] = None, format: Union[str, List[str]] = None, bypass: bool = False)

Sets how the figure or subplot is output, either by displaying it on the screen or writing it to hard-disk.

This object wraps the following Matplotlib methods:

The default behaviour is the display the figure on the computer screen, as opposed to outputting to hard-disk as a file.

Parameters:
  • path – If the figure is output to hard-disk the path of the folder it is saved to.
  • filename – If the figure is output to hard-disk the filename used to save it.
  • format – The format of the output, ‘show’ displays on the computer screen, ‘png’ outputs to .png, ‘fits’ outputs to .fits format.
  • bypass – Whether to bypass the plt.show or plt.savefig methods, used when plotting a subplot.

Methods

__init__(path, filename, format, …) Sets how the figure or subplot is output, either by displaying it on the screen or writing it to hard-disk.
subplot_to_figure([auto_filename]) Output a subplot figure, either as an image on the screen or to the hard-disk as a png or fits file.
to_figure(structure, auto_filename) Output the figure, by either displaying it on the user’s screen or to the hard-disk as a .png or .fits file.

Attributes

format
format_list
to_figure(structure: Optional[autoarray.structures.abstract_structure.AbstractStructure], auto_filename: Optional[str] = None)

Output the figure, by either displaying it on the user’s screen or to the hard-disk as a .png or .fits file.

Parameters:structure – The 2D array of image to be output, required for outputting the image as a fits file.
subplot_to_figure(auto_filename=None)

Output a subplot figure, either as an image on the screen or to the hard-disk as a png or fits file.