marsilea.plotter.Image#
- class Image(images, align='center', scale=1, spacing=0.1, resize=None)#
Bases:
RenderPlanPlot static images
- Parameters:
- imagesarray of image
You can input either path to the image, URL, or numpy array.
- align{“center”, “top”, “bottom”, “left”, “right”}, default: “center”
The alignment of the images.
- scalefloat, default: 1
The scale of the images.
- spacingfloat, default: 0.1
The spacing between images, a value between 0 and 1, relative to the image container size.
- resizeint or tuple, default: None
The size to resize the images.
Examples
>>> import numpy as np >>> import marsilea as ma >>> c = ma.ZeroWidth(height=2) >>> c.add_right( ... ma.plotter.Image( ... [ ... "https://www.iconfinder.com/icons/4375050/download/png/512", ... "https://www.iconfinder.com/icons/8666426/download/png/512", ... "https://www.iconfinder.com/icons/652581/download/png/512", ... ], ... align="right", ... ), ... pad=0.1, ... ) >>> c.add_right( ... ma.plotter.Labels(["Python", "Rust", "JavaScript"], fontsize=20), ... pad=0.1, ... ) >>> c.render()