Stacks a list of rendered images vertically (one below another).
A convenience wrapper around compose_layout().
Arguments
- ...
Images from
render_mesh()orrender_scene(), or a list of images.- colorbar
Optional colorbar from
colorbar_horizontal()orcolorbar_vertical().- colorbar_height
Height of the colorbar in pixels.
- colorbar_width
Width of the colorbar in pixels.
- background
Background RGBA color for padding.
- colorbar_side
Side for the colorbar:
"right"(default) or"left".- crop
If
TRUE, crop whitespace from the output.
Examples
mesh1 <- generate_cuboid(c(0, 2, 0), c(1, 0.5, 1), c(1, 0, 0, 1))
mesh2 <- generate_cuboid(c(0, -2, 0), c(1, 0.5, 1), c(0, 1, 0, 1))
img1 <- render_mesh(mesh1$vertices, mesh1$triangles)
img2 <- render_mesh(mesh2$vertices, mesh2$triangles)
result <- stack_vertical(img1, img2)
tmp_file <- tempfile(fileext = ".png")
write_png(result, tmp_file)