eelbrain.fmtxt.Section.add_image_figure¶
-
Section.
add_image_figure
(image, caption, alt=None)¶ Add an image in a figure frame to the section
- Parameters
image (
Union
[Image
,ndarray
,str
,List
[str
],FMTextElement
,FMTextConstant
]) – Image, image array or target filename for the image. If a filename it should have the appropriate extension.caption (
Union
[str
,List
[str
],FMTextElement
,FMTextConstant
]) – Figure caption.alt (
Optional
[str
]) – Alternate text, placeholder in case the image can not be found (HTML alt tag).
- Returns
image – Image object that was added.
- Return type
See also
add_figure
add an empty figure
Notes
Return the Image object which can be used to write the image data. If a function supports writing to a file-like object, it can be written with
save_image(image)
. A function that writes a file to disk can be used assave_image(image.
.