Image#
- class aastex.Image(name, figure=None, source=None, args=(), kwargs=<factory>)[source]#
Bases:
objectAn image file which needs to live in the build directory next to the
.texfile which references it.Images are written by
Document.generate_pdf()instead of when they are added to aFigure, since the build directory is not known until the document is compiled.Instances are created by
Figure.add_fig()andFigure.add_image()rather than directly, and the images belonging to a figure or a whole document can be inspected usingFigure.imagesandDocument.images.Attributes
Extra arguments passed to
matplotlib.figure.Figure.savefig().A
matplotlibfigure to save, if this image is generated.The current location of this image, if it is an existing file.
The name of this image inside the build directory.
Extra keyword arguments passed to
matplotlib.figure.Figure.savefig().Methods
__init__(name[, figure, source, args, kwargs])is_same_file(other)Whether this image and
otherare the same file on disk.write(directory)Save or copy this image into
directoryand return its new location.Inheritance Diagram

- is_same_file(other)[source]#
Whether this image and
otherare the same file on disk.Two generated images are never the same file, since each is saved from its own
matplotlibfigure.
- args: tuple = ()#
Extra arguments passed to
matplotlib.figure.Figure.savefig().
- figure: None | Figure = None#
A
matplotlibfigure to save, if this image is generated.
- kwargs: dict#
Extra keyword arguments passed to
matplotlib.figure.Figure.savefig().