Skip to content
render_grid_svg

render_grid_svg

Mojo function 🡭

render_grid_svg

fn def render_grid_svg(plots: List[AnyChart], cells: List[GridCell], width: Int, height: Int, row_weights: List[Float64] = List(), col_weights: List[Float64] = List(), shared_y_scale: Bool = False, shared_x_scale: Bool = False, align_axes: Bool = False, title: String = "") -> SvgCanvas

render_grid()’s counterpart for SvgCanvas.

Args:

  • plots (List[AnyChart]): The charts, one per cell.
  • cells (List[GridCell]): Where each plot goes.
  • width (Int): Figure width.
  • height (Int): Figure height.
  • row_weights (List[Float64]): Relative row heights, empty for equal rows.
  • col_weights (List[Float64]): Relative column widths, empty for equal columns.
  • shared_y_scale (Bool): Give every cell one y-domain.
  • shared_x_scale (Bool): Give every cell one x-domain. The continuous marks pool their x extents; categorical cells must name the same categories in the same order.
  • align_axes (Bool): Share plot-rect edges, as render_grid().
  • title (String): A figure title above the cells, as render_grid().

Returns:

SvgCanvas: The rendered figure as vector markup.

Raises:

Error: Whatever render_grid() raises.