-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Hi,
I am trying to produce something like the attached image (Fig. 1) essentially a slide with a 3x3 grid of images, with a title. I say this in case there is a much easier way to obtain this layout, and the issue I am experiencing is not an issue at all!
As a test, I am trying to create a 2x2 grid, using nested boxes:
@deck.slide()
def test(slide):
row1 = slide.box(row=True)
row2 = slide.box(row=True)
row1.image("image/path.png")
row1.image("image/path.png")
row2.image("image/path.png")
row2.image("image/path.png")This produces the output in Fig. 2, where the images are aligned in a grid but only a small portion is showing.
If I try to fix the heights, even very small ones, the images overlap as seen in Fig. 3.
@deck.slide()
def test(slide):
row1 = slide.box(row=True, height=100)
row2 = slide.box(row=True, height=100)
row1.image("image/path.png")
row1.image("image/path.png")
row2.image("image/path.png")
row2.image("image/path.png")If I individually set the height and width to "50%" for all the .image() lines, then the slide is completely blank!
My questions are:
- Is there an easier way to do this that I am missing?
- Within the current boxes-within-boxes setup, how do I get it so that the images are all arranged evenly on the slide, or is there an error somewhere like the child boxes are not properly inheriting the total size from the parent?
- In the future, is there the possibility of having a set grid layout e.g. akin to matplotlib's
subplotwhere you can create and populate a grid of boxes?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels


