I am currently desperately trying out to align three images with different sizes in a gridlike layout.
Essentially, I would like to insert three raster images of different shapes. I would like to be able to define their boundary and aspect ratio of each raster independently that they are not stretched in one dimension. However, I fail to find a fix doing that.
My code snipplet:
import holoviews as hv
import numpy as np
hv.extension('bokeh')
%%opts Raster [show_frame=False shared_axes=False]
hv.Layout(hv.Raster(np.eye(100,100),group='t1') +
hv.Raster(np.eye(100,20),group='t2') +
hv.Raster(np.eye(20,100),group='t3')).cols(2)
Which produces the following: Sample Image
Is there any way to define each raster image bounding box individually in a layout?
Thanks in advance!
I found the solution after searching through the API.
width and height can be adjusted individually by opts:
hv.Raster(np.eye(100,100),group='t1').opts(plot=dict(width=500, height=500))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With